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

The following examples show how to use com.watabou.noosa.NoosaScript#drawElements() . 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 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 3
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 4
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 5
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 6
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 7
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 8
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();
}