Skip to content

Commit

Permalink
Merge branch 'master' into egl
Browse files Browse the repository at this point in the history
  • Loading branch information
tsayao committed Mar 31, 2024
2 parents c5c5606 + eca3235 commit bc1ebd3
Show file tree
Hide file tree
Showing 630 changed files with 20,570 additions and 12,494 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ testbin/
**/Ensemble8/lib/
**/Ensemble8/src/generated/resources/ensemble/search/index/write.lock
**/nbproject/private/
hs_err_pid*

# Ignore webrevs
/webrev/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -87,8 +87,10 @@ private void process(InputStream stream) throws IOException {
}

private class FileParserCallback extends MaxAseTokenizer.Callback {
@Override
void onValue(String name, Callback.ParamList list) {}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*SCENE":
Expand All @@ -114,6 +116,7 @@ private class MaterialListParser extends Callback {
Material current;
int currentMapId;

@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*MATERIAL_COUNT":
Expand Down Expand Up @@ -142,6 +145,7 @@ void onValue(String name, Callback.ParamList list) {
}
}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*MATERIAL":
Expand All @@ -164,6 +168,7 @@ public NodeTMParser(NodeTM newNodeTm) {
nodeTm = newNodeTm;
}

@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*NODE_NAME":
Expand All @@ -181,6 +186,7 @@ void onValue(String name, Callback.ParamList list) {
}

private abstract class NodeParserBase extends MaxAseTokenizer.Callback {
@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*NODE_NAME":
Expand All @@ -190,6 +196,7 @@ void onValue(String name, Callback.ParamList list) {
}
}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*NODE_TM": return new NodeTMParser(addNodeTm());
Expand All @@ -207,10 +214,13 @@ Callback onObject(String name, Callback.ParamList list) {
private class LightNodeParser extends NodeParserBase {
LightNode n;

@Override
Node createNode() { return n = new LightNode(); }

@Override
Node getNode() { return n; }

@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*LIGHT_INTENS":
Expand All @@ -224,6 +234,7 @@ void onValue(String name, Callback.ParamList list) {
}
}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*LIGHT_SETTINGS": return this;
Expand All @@ -236,17 +247,21 @@ Callback onObject(String name, Callback.ParamList list) {
private class CameraNodeParser extends NodeParserBase {
CameraNode node;

@Override
Node createNode() { return node = new CameraNode(); }

@Override
Node getNode() { return node; }

@Override
NodeTM addNodeTm() {
NodeTM ntm = new NodeTM();
if (node.nodeTM == null) return node.nodeTM = ntm;
if (node.target == null) return node.target = ntm;
return ntm;
}

@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*CAMERA_NEAR":
Expand All @@ -260,6 +275,7 @@ void onValue(String name, Callback.ParamList list) {
}
}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*CAMERA_SETTINGS": return this;
Expand All @@ -271,8 +287,10 @@ Callback onObject(String name, Callback.ParamList list) {
private class NodeParser extends NodeParserBase {
Node n;

@Override
Node createNode() { return n = new Node(); }

@Override
Node getNode() { return n; }
}

Expand All @@ -282,6 +300,7 @@ private static class MeshParser extends Callback {

private MeshParser(Mesh mesh) { this.mesh = mesh; }

@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*MESH_NUMVERTEX":
Expand All @@ -308,6 +327,7 @@ void onValue(String name, Callback.ParamList list) {
}
}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*MESH_VERTEX_LIST": return new MeshVertexList(mesh.points);
Expand Down Expand Up @@ -339,6 +359,7 @@ private static class MeshVertexList extends Callback {

MeshVertexList(float data[]) { this.data = data; }

@Override
void value(byte args[][], int len[], int argc) {
int idx = parseInt(args[1], len[1]) * 3;
data[idx + 0] = parseFloat(args[2], len[2]);
Expand All @@ -352,6 +373,7 @@ private static class MeshTVertexList extends Callback {

MeshTVertexList(float data[]) { this.data = data; }

@Override
void value(byte args[][], int len[], int argc) {
int idx = parseInt(args[1], len[1]) * 2;
data[idx + 0] = parseFloat(args[2], len[2]);
Expand All @@ -364,6 +386,7 @@ private static class MeshTFaceList extends Callback {

MeshTFaceList(int data[]) { this.data = data; }

@Override
void value(byte args[][], int len[], int argc) {
int idx = parseInt(args[1], len[1]) * 3;
data[idx + 0] = parseInt(args[2], len[2]);
Expand All @@ -378,6 +401,7 @@ private static class MeshFaceList extends Callback {

MeshFaceList(int data[]) { this.data = data; }

@Override
void value(byte args[][], int len[], int argc) {
int idx = parseInt(args[1], len[1]) * 4;
data[idx + 0] = parseInt(args[3], len[3]);
Expand Down Expand Up @@ -405,10 +429,13 @@ static private int parseSmGr(byte data[], int l) {
private class GeomNodeParser extends NodeParserBase {
GeomNode n;

@Override
Node createNode() { return n = new GeomNode(); }

@Override
Node getNode() { return n; }

@Override
void onValue(String name, Callback.ParamList list) {
switch (name) {
case "*MATERIAL_REF":
Expand All @@ -417,6 +444,7 @@ void onValue(String name, Callback.ParamList list) {
}
}

@Override
Callback onObject(String name, Callback.ParamList list) {
switch (name) {
case "*MESH":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -110,7 +110,9 @@ void onValue(String name, ParamList list) {}

static public class CallbackNOP extends Callback {
static public final CallbackNOP instance = new CallbackNOP();
@Override
void value(byte args[][], int len[], int argc) {}
@Override
Callback object(byte args[][], int len[], int argc) { return this; }
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -52,6 +52,7 @@ public MNodeType getContext() {
return declaringNodeType;
}

@Override
public void accept(MEnv.Visitor visitor) {
visitor.visitAttribute(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -51,6 +51,7 @@ public MPath getTargetPath() {
return targetPath;
}

@Override
public boolean equals(Object arg) {
if (!(arg instanceof MConnection)) {
return false;
Expand All @@ -60,6 +61,7 @@ public boolean equals(Object arg) {
targetPath.equals(other.targetPath));
}

@Override
public int hashCode() {
return sourcePath.hashCode() ^ targetPath.hashCode();
}
Expand Down
Loading

0 comments on commit bc1ebd3

Please sign in to comment.