Java Code Examples for com.watabou.noosa.NoosaScript#get()

The following examples show how to use com.watabou.noosa.NoosaScript#get() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Flare.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
private void drawRays() {
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting( 
		rm, gm, bm, am, 
		ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nRays * 3 );
}
 
Example 2
Source File: Flare.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
private void drawRays() {
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting(
		rm, gm, bm, am,
		ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nRays * 3 );
}
 
Example 3
Source File: KeyDisplay.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void draw() {
	super.draw();
	if (dirty){
		
		updateVertices();
		
		quads.limit(quads.position());
		if (buffer == null)
			buffer = new Vertexbuffer(quads);
		else
			buffer.updateVertices(quads);
		
	}
	
	NoosaScript script = NoosaScript.get();
	
	tx.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting(
			rm, gm, bm, am,
			ra, ga, ba, aa );
	script.drawQuadSet( buffer, totalKeys, 0 );
}
 
Example 4
Source File: Flare.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
private void drawRays() {
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting( 
		rm, gm, bm, am, 
		ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nRays * 3 );
}
 
Example 5
Source File: ItemSprite.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void draw() {
	super.draw();


	if(overlay != null) {
		NoosaScript script = NoosaScript.get();

		overlay.texture.bind();
		overlay.updateVerticesBuffer();
		script.drawQuad(overlay.getVerticesBuffer());
	}
}
 
Example 6
Source File: Flare.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
private void drawRays() {
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting(
		rm, gm, bm, am,
		ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nRays * 3 );
}
 
Example 7
Source File: KeyDisplay.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void draw() {
	super.draw();
	if (dirty){
		
		updateVertices();
		
		quads.limit(quads.position());
		if (buffer == null)
			buffer = new Vertexbuffer(quads);
		else
			buffer.updateVertices(quads);
		
	}
	
	NoosaScript script = NoosaScript.get();
	
	tx.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting(
			rm, gm, bm, am,
			ra, ga, ba, aa );
	script.drawQuadSet( buffer, totalKeys, 0 );
}
 
Example 8
Source File: Flare.java    From pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
private void drawRays() {
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting( 
		rm, gm, bm, am, 
		ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nRays * 3 );
}
 
Example 9
Source File: Flare.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
private void drawRays() {
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting(
		rm, gm, bm, am,
		ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nRays * 3 );
}
 
Example 10
Source File: SurfaceScene.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();

	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting(
		rm, gm, bm, am,
		ra, ga, ba, aa );
	
	script.drawQuad( verticesBuffer );
}
 
Example 11
Source File: CircleArc.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();
	
	if (dirty) {
		updateTriangles();
	}
	
	if (lightMode) Blending.setLightMode();
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting(
			rm, gm, bm, am,
			ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nTris * 3 );
	
	if (lightMode) Blending.setNormalMode();
}
 
Example 12
Source File: SurfaceScene.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();

	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting( 
		rm, gm, bm, am, 
		ra, ga, ba, aa );
	
	script.drawQuad( verticesBuffer );
}
 
Example 13
Source File: SurfaceScene.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();

	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting( 
		rm, gm, bm, am, 
		ra, ga, ba, aa );
	
	script.drawQuad( verticesBuffer );
}
 
Example 14
Source File: SurfaceScene.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();

	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting(
		rm, gm, bm, am,
		ra, ga, ba, aa );
	
	script.drawQuad( verticesBuffer );
}
 
Example 15
Source File: SurfaceScene.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();

	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting(
		rm, gm, bm, am,
		ra, ga, ba, aa );
	
	script.drawQuad( verticesBuffer );
}
 
Example 16
Source File: CircleArc.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();
	
	if (dirty) {
		updateTriangles();
	}
	
	if (lightMode) Blending.setLightMode();
	
	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.uModel.valueM4( matrix );
	script.lighting(
			rm, gm, bm, am,
			ra, ga, ba, aa );
	
	script.camera( camera );
	script.drawElements( vertices, indices, nTris * 3 );
	
	if (lightMode) Blending.setNormalMode();
}
 
Example 17
Source File: SurfaceScene.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void draw() {
	
	super.draw();

	NoosaScript script = NoosaScript.get();
	
	texture.bind();
	
	script.camera( camera() );
	
	script.uModel.valueM4( matrix );
	script.lighting( 
		rm, gm, bm, am, 
		ra, ga, ba, aa );
	
	script.drawQuad( verticesBuffer );
}