Removed Shader#end
This commit is contained in:
@@ -15,6 +15,7 @@ public class Annotations{
|
|||||||
flying,
|
flying,
|
||||||
bullets,
|
bullets,
|
||||||
effects,
|
effects,
|
||||||
|
overlays,
|
||||||
names,
|
names,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,11 +214,6 @@ public class Annotations{
|
|||||||
PacketPriority priority() default PacketPriority.normal;
|
PacketPriority priority() default PacketPriority.normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Specifies that this method will be used to write classes of the type returned by {@link #value()}.<br>
|
|
||||||
* This method must return void and have two parameters, the first being of type {@link java.nio.ByteBuffer} and the second
|
|
||||||
* being the type returned by {@link #value()}.
|
|
||||||
*/
|
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface TypeIOHandler{
|
public @interface TypeIOHandler{
|
||||||
|
|||||||
@@ -247,6 +247,8 @@ public class Renderer implements ApplicationListener{
|
|||||||
player.builder().drawBuildRequests();
|
player.builder().drawBuildRequests();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Groups.drawOverlays();
|
||||||
|
|
||||||
overlays.drawTop();
|
overlays.drawTop();
|
||||||
|
|
||||||
endFx();
|
endFx();
|
||||||
|
|||||||
@@ -657,7 +657,7 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc{
|
|||||||
|
|
||||||
/** Called when arbitrary configuration is applied to a tile. */
|
/** Called when arbitrary configuration is applied to a tile. */
|
||||||
public void configured(@Nullable Playerc player, @Nullable Object value){
|
public void configured(@Nullable Playerc player, @Nullable Object value){
|
||||||
//null is of type Void.class; anonymous classes use their superclass.
|
//null is of type void.class; anonymous classes use their superclass.
|
||||||
Class<?> type = value == null ? void.class : value.getClass().isAnonymousClass() ? value.getClass().getSuperclass() : value.getClass();
|
Class<?> type = value == null ? void.class : value.getClass().isAnonymousClass() ? value.getClass().getSuperclass() : value.getClass();
|
||||||
|
|
||||||
if(block.configurations.containsKey(type)){
|
if(block.configurations.containsKey(type)){
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class IndexedRenderer implements Disposable{
|
|||||||
|
|
||||||
updateMatrix();
|
updateMatrix();
|
||||||
|
|
||||||
program.begin();
|
program.bind();
|
||||||
|
|
||||||
texture.bind();
|
texture.bind();
|
||||||
|
|
||||||
@@ -69,7 +69,6 @@ public class IndexedRenderer implements Disposable{
|
|||||||
|
|
||||||
mesh.render(program, Gl.triangles, 0, vertices.length / vsize);
|
mesh.render(program, Gl.triangles, 0, vertices.length / vsize);
|
||||||
|
|
||||||
program.end();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor(Color color){
|
public void setColor(Color color){
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.graphics.g3d;
|
|||||||
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.gl.*;
|
import arc.graphics.gl.*;
|
||||||
import arc.math.geom.*;
|
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
|
||||||
/** Defines a mesh that is rendered for a planet. Subclasses provide a mesh and a shader. */
|
/** Defines a mesh that is rendered for a planet. Subclasses provide a mesh and a shader. */
|
||||||
@@ -22,11 +21,10 @@ public abstract class PlanetMesh{
|
|||||||
|
|
||||||
public void render(Mat3D projection, Mat3D transform){
|
public void render(Mat3D projection, Mat3D transform){
|
||||||
preRender();
|
preRender();
|
||||||
shader.begin();
|
shader.bind();
|
||||||
shader.setUniformMatrix4("u_proj", projection.val);
|
shader.setUniformMatrix4("u_proj", projection.val);
|
||||||
shader.setUniformMatrix4("u_trans", transform.val);
|
shader.setUniformMatrix4("u_trans", transform.val);
|
||||||
shader.apply();
|
shader.apply();
|
||||||
mesh.render(shader, Gl.triangles);
|
mesh.render(shader, Gl.triangles);
|
||||||
shader.end();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,12 +242,11 @@ public class PlanetDialog extends FloatingDialog{
|
|||||||
//Log.info(tile);
|
//Log.info(tile);
|
||||||
Shaders.planetGrid.mouse.lerp(tile == null ? Vec3.Zero : tile.sub(planet.position).rotate(Vec3.Y, planet.getRotation()), 0.2f);
|
Shaders.planetGrid.mouse.lerp(tile == null ? Vec3.Zero : tile.sub(planet.position).rotate(Vec3.Y, planet.getRotation()), 0.2f);
|
||||||
|
|
||||||
shader.begin();
|
shader.bind();
|
||||||
shader.setUniformMatrix4("u_proj", cam.combined().val);
|
shader.setUniformMatrix4("u_proj", cam.combined().val);
|
||||||
shader.setUniformMatrix4("u_trans", planet.getTransform(mat).val);
|
shader.setUniformMatrix4("u_trans", planet.getTransform(mat).val);
|
||||||
shader.apply();
|
shader.apply();
|
||||||
mesh.render(shader, Gl.lines);
|
mesh.render(shader, Gl.lines);
|
||||||
shader.end();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawBorders(Sector sector, Color base){
|
private void drawBorders(Sector sector, Color base){
|
||||||
|
|||||||
Reference in New Issue
Block a user