Skip to content

Commit

Permalink
Water Surface using JOGL
Browse files Browse the repository at this point in the history
  • Loading branch information
pasleto committed Apr 27, 2019
1 parent 7fa77dd commit 365dcb9
Show file tree
Hide file tree
Showing 1,770 changed files with 1,555,432 additions and 0 deletions.
75 changes: 75 additions & 0 deletions source_code/app/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package app;

import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.FPSAnimator;
import renderer.Renderer;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.net.URL;

public class App {
private static final int FPS = 60; // animator's target frames per second
private Dimension dimension = new Dimension(1415, 800); //default dimension of window
private Dimension minDimension = new Dimension(1415, 800); //minimal dimension of windows
private URL iconURL = getClass().getResource("../assets/icon.png"); //app image url
private ImageIcon icon = new ImageIcon(iconURL); //app image declaration

private void start() {
try {
Frame frame = new Frame();
frame.setTitle("UHK FIM - PGRF2 - Tomáš Pásler - Water Surface Simulation Project");
frame.setSize(dimension);
frame.setMinimumSize(minDimension);
frame.setExtendedState(Frame.MAXIMIZED_BOTH);

frame.setIconImage(icon.getImage()); //set app image

GLProfile profile = GLProfile.get(GLProfile.GL2);
GLCapabilities capabilities = new GLCapabilities(profile);
capabilities.setRedBits(8);
capabilities.setBlueBits(8);
capabilities.setGreenBits(8);
capabilities.setAlphaBits(8);
capabilities.setDepthBits(24);

GLCanvas canvas = new GLCanvas(capabilities);
Renderer renderer = new Renderer();
canvas.addGLEventListener(renderer);
canvas.addMouseListener(renderer);
canvas.addMouseMotionListener(renderer);
canvas.addKeyListener(renderer);
canvas.setSize(dimension);

frame.add(canvas);

final FPSAnimator animator = new FPSAnimator(canvas, FPS, true);

frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
new Thread(() -> {
if (animator.isStarted()) animator.stop();
System.exit(0);
}).start();
}
});
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
animator.start(); // start the animation loop

} catch (Exception e) {
e.printStackTrace();
}
}

public static void main(String[] args) {
SwingUtilities.invokeLater(() -> new App().start());
}

}
Binary file added source_code/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
254 changes: 254 additions & 0 deletions source_code/libs/gluegen/javadoc/allclasses-frame.html

Large diffs are not rendered by default.

254 changes: 254 additions & 0 deletions source_code/libs/gluegen/javadoc/allclasses-noframe.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_55) on Fri Oct 09 06:20:51 CEST 2015 -->
<title>ExceptionUtils.CustomStackTrace (GlueGen Runtime Documentation)</title>
<meta name="date" content="2015-10-09">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ExceptionUtils.CustomStackTrace (GlueGen Runtime Documentation)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/jogamp/common/ExceptionUtils.html" title="class in com.jogamp.common"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/jogamp/common/GlueGenVersion.html" title="class in com.jogamp.common"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/jogamp/common/ExceptionUtils.CustomStackTrace.html" target="_top">Frames</a></li>
<li><a href="ExceptionUtils.CustomStackTrace.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.jogamp.common</div>
<h2 title="Interface ExceptionUtils.CustomStackTrace" class="title">Interface ExceptionUtils.CustomStackTrace</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../com/jogamp/common/util/SourcedInterruptedException.html" title="class in com.jogamp.common.util">SourcedInterruptedException</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../com/jogamp/common/ExceptionUtils.html" title="class in com.jogamp.common">ExceptionUtils</a></dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="strong">ExceptionUtils.CustomStackTrace</span></pre>
<div class="block">Interface allowing <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> specializations to provide their custom stack trace presentation.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>2.3.2</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/jogamp/common/ExceptionUtils.CustomStackTrace.html#printCauseStack(java.io.PrintStream, java.lang.String, int, int)">printCauseStack</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a>&nbsp;s,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;causeStr,
int&nbsp;causeIdx,
int&nbsp;stackDepth)</code>
<div class="block">Prints this <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> as a cause to the output <a href="http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io"><code>PrintStream</code></a> <code>s</code>,
not iterating over all inner causes!</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/jogamp/common/ExceptionUtils.CustomStackTrace.html#printStackTrace(java.io.PrintStream, int, int)">printStackTrace</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a>&nbsp;s,
int&nbsp;causeDepth,
int&nbsp;stackDepth)</code>
<div class="block">Custom <code>printStackTrace</code> method, similar to <code>Throwable#printStackTrace(PrintStream, int, int)</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="printCauseStack(java.io.PrintStream, java.lang.String, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printCauseStack</h4>
<pre>void&nbsp;printCauseStack(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a>&nbsp;s,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;causeStr,
int&nbsp;causeIdx,
int&nbsp;stackDepth)</pre>
<div class="block">Prints this <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> as a cause to the output <a href="http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io"><code>PrintStream</code></a> <code>s</code>,
not iterating over all inner causes!</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>s</code> - output stream</dd><dd><code>causeStr</code> - the cause title</dd><dd><code>causeIdx</code> - the cause index over all causes known by caller</dd><dd><code>stackDepth</code> - the maximum depth for stack entries, or <code>-1</code> for all</dd><dt><span class="strong">Since:</span></dt>
<dd>2.3.2</dd></dl>
</li>
</ul>
<a name="printStackTrace(java.io.PrintStream, int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>printStackTrace</h4>
<pre>void&nbsp;printStackTrace(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a>&nbsp;s,
int&nbsp;causeDepth,
int&nbsp;stackDepth)</pre>
<div class="block">Custom <code>printStackTrace</code> method, similar to <code>Throwable#printStackTrace(PrintStream, int, int)</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>s</code> - output stream</dd><dd><code>causeDepth</code> - the maximum depth for causes, or <code>-1</code> for all</dd><dd><code>stackDepth</code> - the maximum depth for stack entries, or <code>-1</code> for all</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/jogamp/common/ExceptionUtils.html" title="class in com.jogamp.common"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/jogamp/common/GlueGenVersion.html" title="class in com.jogamp.common"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/jogamp/common/ExceptionUtils.CustomStackTrace.html" target="_top">Frames</a></li>
<li><a href="ExceptionUtils.CustomStackTrace.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
Loading

0 comments on commit 365dcb9

Please sign in to comment.