This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Element position = new Element(new GenericVector(DataType.FLOAT, 3), "Position"); | |
DataLayout layout = new DataLayout(position); | |
VertexBuffer vertexBuffer = new VertexBuffer(layout, 100); | |
vertexBuffer.fullyInitialize(); | |
for(Vertex v: vertexBuffer) | |
{ | |
v.setAttribute(position, 3f, 2f, 4f); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Element position = new Element(new GenericVector(DataType.FLOAT, 3), "Position"); | |
DataLayout layout = new DataLayout(position); | |
VertexBuffer vertexBuffer = new VertexBuffer(layout, 100); | |
//Erstellt eine tessiliertes Quadrat, | |
//der tessFactor sagt wieviele spalten udn reihen es geben soll | |
CellFactory factory = new CellFactory(10); | |
factory.createCell(new Vector2(0,0)); | |
factory.fillVBufferPerVertex(vertexBuffer, new PerVertexFiller() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mdes.j4k.tools; | |
import java.awt.Toolkit; | |
import java.awt.datatransfer.Clipboard; | |
import java.awt.datatransfer.StringSelection; | |
public class ArrayTranslate { | |
/** Max number of entities */ | |
public static final int COUNT = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package communication; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.InputStreamReader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in vec3 normal; | |
in vec3 eye;//from vertex to eye/origin | |
const light = vec3(0.12708472893924555, -2.5399460893115735, 2.8320502943377743) // from vertex to lightsource | |
const vec3 LIGHT_COLOR = vec3(1, 0.7, 0.4); | |
//created textures have to have realistic values | |
//Fresh asphalt 0.04 | |
//Worn asphalt 0.12 | |
//Bare soil 0.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>info.yeppp</groupId> | |
<artifactId>yeppp</artifactId> | |
<version>1.0</version> | |
<packaging>jar</packaging> | |
<properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shapeless._ | |
object Bullshit { | |
sealed abstract class Size[T](val size:Int) | |
object Size{ | |
implicit object sizeForString extends Size[String](9) | |
implicit object sizeForInt extends Size[Int](4) | |
implicit object sizeForFloat extends Size[Float](7) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait A[T]{ | |
def foo(): Any | |
} | |
implicit object B extends A[Bar]{ | |
def foo(): String = "Hi" | |
} | |
val a: String = B.foo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
package VarVal; | |
sub println | |
{ | |
print @_, "\n"; | |
} | |
sub val | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App { | |
interface B<T>{T get();} | |
interface C<S>{} | |
static void error() { | |
C a = null; | |
/* | |
* No error, but an Error with Java 7(which is correct). | |
* Foo returns a Rawtype which gets mapped to B<Float> |
OlderNewer