Compare commits
3 Commits
e0693e0bf8
...
a9ae5adc5c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a9ae5adc5c | ||
![]() |
fb8d53359e | ||
![]() |
3dd42d77ca |
41
pom.xml
41
pom.xml
@ -1,17 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>gale</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<properties>
|
||||
<maven.compiler.version>3.13.0</maven.compiler.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
||||
<lwjgl.version>3.3.3</lwjgl.version>
|
||||
<lwjgl3-awt.version>0.1.8</lwjgl3-awt.version>
|
||||
<lwjgl.natives>natives-linux</lwjgl.natives>
|
||||
</properties>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Mozilla Public License 2.0</name>
|
||||
<url>https://opensource.org/licenses/MPL-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>dev1</id>
|
||||
<name>Edouard DUPIN</name>
|
||||
<email>edouard.dupin@proton.me</email>
|
||||
<roles>
|
||||
<role>Lead Developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
@ -251,7 +265,7 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.11.0-M2</version>
|
||||
<version>5.11.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -263,22 +277,21 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testSourceDirectory>test/src</testSourceDirectory>
|
||||
<testSourceDirectory>src/test</testSourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.version}</version>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
|
||||
<source>21</source>
|
||||
<target>21</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Create the source bundle -->
|
||||
@ -299,7 +312,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<version>3.2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
@ -318,7 +331,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<show>private</show>
|
||||
<nohelp>true</nohelp>
|
||||
@ -332,7 +345,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<show>public</show>
|
||||
</configuration>
|
||||
|
@ -55,7 +55,14 @@ public class ResourceTexture extends Resource {
|
||||
return null;
|
||||
}
|
||||
resource = new ResourceTexture(uriTexture, textureUnit);
|
||||
final ImageRawData decodedData = ImageLoader.decodePngFile(uriTexture);
|
||||
ImageRawData decodedData;
|
||||
try {
|
||||
decodedData = ImageLoader.decodePngFile(uriTexture);
|
||||
} catch (final Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
final ImageByteRGBA img = new ImageByteRGBA(decodedData.getWidth(), decodedData.getHeight());
|
||||
final ByteBuffer mlklmklm = decodedData.getBuffer();
|
||||
final byte[] elemData = new byte[mlklmklm.remaining()];
|
@ -243,7 +243,7 @@ public class ResourceTexture2 extends Resource {
|
||||
if (this.loaded) {
|
||||
if (this.lastTypeObject != typeObject || this.lastSizeObject != sizeObject
|
||||
|| !this.lastSize.equals(this.data.getSize())) {
|
||||
LOGGER.warn("TEXTURE: Rm [" + getId() + "] texId=" + this.texId);
|
||||
LOGGER.trace("TEXTURE: Rm [" + getId() + "] texId=" + this.texId);
|
||||
OpenGL.glDeleteTextures(this.texId);
|
||||
this.loaded = false;
|
||||
}
|
@ -20,8 +20,6 @@ import org.lwjgl.opengl.GL30;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
//import models.RawModel;
|
||||
|
||||
public class ResourceVirtualArrayObject extends Resource {
|
||||
static final Logger LOGGER = LoggerFactory.getLogger(ResourceVirtualArrayObject.class);
|
||||
public static final int INDICE_VBO_POSITIONS = 0;
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
@ -5,12 +5,11 @@ import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
|
||||
import org.atriasoft.pngdecoder.PNGDecoder;
|
||||
import org.atriasoft.pngdecoder.PNGDecoder.Format;
|
||||
|
||||
public class ImageLoader {
|
||||
public static ImageRawData decodePngFile(final Uri filename) {
|
||||
public static ImageRawData decodePngFile(final Uri filename) throws Exception {
|
||||
ByteBuffer buf = null;
|
||||
int tWidth = 0;
|
||||
int tHeight = 0;
|
||||
@ -18,6 +17,9 @@ public class ImageLoader {
|
||||
try {
|
||||
// Open the PNG file as an InputStream
|
||||
final InputStream in = Uri.getStream(filename);
|
||||
if (in == null) {
|
||||
throw new Exception("fail to get th estream ...");
|
||||
}
|
||||
// Link the PNG decoder to this stream
|
||||
final PNGDecoder decoder = new PNGDecoder(in);
|
||||
// Get the width and height of the texture
|
@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Basic module interface.
|
||||
*
|
||||
* @author Edouard DUPIN
|
||||
*/
|
||||
|
||||
open module org.atriasoft.gale {
|
||||
exports org.atriasoft.gale;
|
||||
exports org.atriasoft.gale.backend3d;
|
||||
exports org.atriasoft.gale.context;
|
||||
// exports org.atriasoft.gale.context.JOGL;
|
||||
exports org.atriasoft.gale.context.LWJG_AWT;
|
||||
exports org.atriasoft.gale.key;
|
||||
exports org.atriasoft.gale.resource;
|
||||
|
||||
requires transitive org.atriasoft.etk;
|
||||
requires transitive org.atriasoft.egami;
|
||||
|
||||
requires transitive org.lwjgl;
|
||||
requires transitive org.lwjgl.natives;
|
||||
requires transitive org.lwjgl.glfw;
|
||||
requires transitive org.lwjgl.glfw.natives;
|
||||
requires transitive org.lwjgl.assimp;
|
||||
requires transitive org.lwjgl.assimp.natives;
|
||||
requires transitive org.lwjgl.stb;
|
||||
requires transitive org.lwjgl.stb.natives;
|
||||
requires transitive org.lwjgl.jawt;
|
||||
requires transitive org.lwjgl.opengl;
|
||||
requires transitive org.lwjgl.opengl.natives;
|
||||
|
||||
requires transitive java.desktop;
|
||||
requires transitive org.atriasoft.pngdecoder;
|
||||
requires transitive lwjgl3.awt;
|
||||
requires org.atriasoft.iogami;
|
||||
requires org.slf4j;
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package org.atriasoft.gale.test.sample1;
|
||||
|
||||
public class Log {
|
||||
private Log() {}
|
||||
private static final String LIBNAME = "Sample1";
|
||||
public static void print(String data) {
|
||||
System.out.println(data);
|
||||
}
|
||||
public static void critical(String data) {
|
||||
System.out.println("[C] " + LIBNAME + " | " + data);
|
||||
}
|
||||
public static void error(String data) {
|
||||
System.out.println("[E] " + LIBNAME + " | " + data);
|
||||
}
|
||||
public static void warning(String data) {
|
||||
System.out.println("[W] " + LIBNAME + " | " + data);
|
||||
}
|
||||
public static void info(String data) {
|
||||
System.out.println("[I] " + LIBNAME + " | " + data);
|
||||
}
|
||||
public static void debug(String data) {
|
||||
System.out.println("[D] " + LIBNAME + " | " + data);
|
||||
}
|
||||
public static void verbose(String data) {
|
||||
System.out.println("[V] " + LIBNAME + " | " + data);
|
||||
}
|
||||
public static void todo(String data) {
|
||||
System.out.println("[TODO] " + LIBNAME + " | " + data);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user