Skip to content

Commit

Permalink
Added PNGDecoder for futur use (Skybox)
Browse files Browse the repository at this point in the history
Removed old shaders
Added Skybox shaders
PageManager and RenderablePage are now SceneManager and Scene
-> Every "page" have been changed to "scene"
SGELabelPage is now SGETitleScene
AudioLogger is now SoundSystemLoggerBridge
ModernShader.java has been removed. you can now extend directly from ShaderProgram

DeferredRenderer:
- Removed some commented code
- Moved shadows render to ShadowsRenderer.java
- Moved PostProcessing default pipeline to PostProcessingPipelineDefault.java
- DeferredRenderer now have a setPostProcessingPipeline(PostProcessingPipeline) function to have custom post processing shaders
- Post processing shaders are now an extension of DeferredShaderProgram (easier use)
- Removed useless FBOs
  • Loading branch information
Slaynash committed Nov 12, 2017
1 parent f4c8062 commit d633509
Show file tree
Hide file tree
Showing 65 changed files with 580 additions and 631 deletions.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<classpathentry kind="lib" path="libs/physics/jbox2d_sge_edition_0808171240.jar"/>
<classpathentry kind="lib" path="libs/jamepad_sge_edition_2607171819.jar"/>
<classpathentry kind="lib" path="libs/localizationUtils_1792f78.jar"/>
<classpathentry kind="lib" path="libs/PNGDecoder.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Binary file modified bin/slaynash/sgengine/Configuration$1.class
Binary file not shown.
Binary file modified bin/slaynash/sgengine/Configuration.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/SGELabelPage.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/audio/AudioLogger.class
Binary file not shown.
Binary file modified bin/slaynash/sgengine/audio/AudioManager.class
Binary file not shown.
Binary file modified bin/slaynash/sgengine/models/Renderable3dModel.class
Binary file not shown.
Binary file modified bin/slaynash/sgengine/objloader/ObjLoader.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/shaders/ModernShader.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/shaders/ModernShader3D.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/shaders/ModernShaderGUI.class
Binary file not shown.
Binary file not shown.
Binary file removed bin/slaynash/sgengine/shaders/ModernShaderVR.class
Binary file not shown.
Binary file modified bin/slaynash/sgengine/shaders/ShaderManager.class
Binary file not shown.
Binary file modified bin/slaynash/sgengine/utils/DisplayManager.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/utils/PageManager$1.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/utils/PageManager.class
Binary file not shown.
Binary file removed bin/slaynash/sgengine/utils/RenderablePage.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added libs/PNGDecoder.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions res/shaders/free/free2d.fs

This file was deleted.

12 changes: 0 additions & 12 deletions res/shaders/free/free2d.vs

This file was deleted.

7 changes: 0 additions & 7 deletions res/shaders/free/free3d.fs

This file was deleted.

10 changes: 0 additions & 10 deletions res/shaders/free/free3d.vs

This file was deleted.

51 changes: 0 additions & 51 deletions res/shaders/free/freeGUI.fs

This file was deleted.

9 changes: 0 additions & 9 deletions res/shaders/free/freeGUI.vs

This file was deleted.

8 changes: 0 additions & 8 deletions res/shaders/free/freeLabel.fs

This file was deleted.

6 changes: 0 additions & 6 deletions res/shaders/free/freeLabel.vs

This file was deleted.

7 changes: 0 additions & 7 deletions res/shaders/free/freeVR.fs

This file was deleted.

10 changes: 0 additions & 10 deletions res/shaders/free/freeVR.vs

This file was deleted.

10 changes: 10 additions & 0 deletions res/shaders/skybox/skybox.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#version 400

in vec3 textureCoords;
out vec4 out_Color;

uniform samplerCube cubeMap;

void main(void){
out_Color = texture(cubeMap, textureCoords);
}
14 changes: 14 additions & 0 deletions res/shaders/skybox/skybox.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#version 400

in vec3 position;
out vec3 textureCoords;

uniform mat4 projectionMatrix;
uniform mat4 viewMatrix;

void main(void){

gl_Position = projectionMatrix * viewMatrix * vec4(position, 1.0);
textureCoords = position;

}
13 changes: 9 additions & 4 deletions src/slaynash/sgengine/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.net.URLDecoder;

import slaynash.sgengine.playercharacters.PlayerCharacter;
import slaynash.sgengine.utils.PageManager;
import slaynash.sgengine.utils.SceneManager;

public class Configuration {

Expand Down Expand Up @@ -107,7 +107,11 @@ public static void loadDefault3DRPGConfigurations() {
setSelfEntitiesUpdateEnabled(true);
setHandRendered(false);
}


/**
* @return The install path of the game.<br>
* Default location: jar file location
*/
public static String getAbsoluteInstallPath() {
if(installPath.equals("")){
try {
Expand All @@ -116,6 +120,7 @@ public static String getAbsoluteInstallPath() {
LogSystem.out_println("[Configuration] Root directory: "+installPath);
}catch (UnsupportedEncodingException e1) {e1.printStackTrace(LogSystem.getErrStream());}
}
if(!installPath.endsWith("\\") && !installPath.endsWith("/")) installPath += "/";
return installPath;
}

Expand Down Expand Up @@ -188,7 +193,7 @@ public static void setZFar(float zfar){
}

public static void enableVR(boolean enable){
if(!PageManager.isInitialized()){
if(!SceneManager.isInitialized()){
vr = enable;
}
else LogSystem.out_println("[PageManager] Display manager already initialized ! Please enable or disable VR before !");
Expand Down Expand Up @@ -327,7 +332,7 @@ public static void setHandRendered(boolean handrendered) {
Configuration.handRendered = handrendered;
}

public static boolean isDeferredRenderBloomEnabled() {
public static boolean isPostProcessingEnabled() {
return deferredRenderBloom;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import slaynash.sgengine.textureUtils.TextureManager;
import slaynash.sgengine.utils.DisplayManager;
import slaynash.sgengine.utils.MatrixUtils;
import slaynash.sgengine.utils.RenderablePage;
import slaynash.sgengine.utils.Scene;
import slaynash.sgengine.utils.VRUtils;
import slaynash.sgengine.utils.vr.VRController;
import slaynash.sgengine.world3d.loader.Ent_PointLight;

public class SGELabelPage extends RenderablePage {
public class SGETitleScene extends Scene {

private float startTime;
private TextureDef background;
Expand Down
2 changes: 1 addition & 1 deletion src/slaynash/sgengine/audio/AudioManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void init() {
return;
}
random = new Random();
SoundSystemConfig.setLogger(new AudioLogger());
SoundSystemConfig.setLogger(new SoundSystemLoggerBridge());
boolean aLCompatible = SoundSystem.libraryCompatible( LibraryLWJGLOpenAL.class );
try {
Class<? extends Library> libraryType = Library.class;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import paulscode.sound.SoundSystemLogger;
import slaynash.sgengine.LogSystem;

public class AudioLogger extends SoundSystemLogger {
public class SoundSystemLoggerBridge extends SoundSystemLogger {
@Override
public void message( String message, int indent )
{
Expand Down
Loading

0 comments on commit d633509

Please sign in to comment.