-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4518a1e
commit 89e8bb7
Showing
12 changed files
with
189 additions
and
275 deletions.
There are no files selected for viewing
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
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
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
74 changes: 74 additions & 0 deletions
74
src/main/java/com/marginallyclever/ro3/render/renderpasses/AbstractRenderPass.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.marginallyclever.ro3.render.renderpasses; | ||
|
||
import com.jogamp.opengl.GLAutoDrawable; | ||
import com.marginallyclever.ro3.render.RenderPass; | ||
|
||
/** | ||
* {@link AbstractRenderPass} handles common methods for all {@link RenderPass}. | ||
*/ | ||
public abstract class AbstractRenderPass implements RenderPass { | ||
private String name; | ||
private int activeStatus = ALWAYS; | ||
protected int canvasWidth, canvasHeight; | ||
|
||
protected AbstractRenderPass() {} | ||
|
||
protected AbstractRenderPass(String name) { | ||
this(); | ||
this.name = name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
/** | ||
* @return the localized name of this pass. | ||
*/ | ||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* @return NEVER, SOMETIMES, or ALWAYS | ||
*/ | ||
@Override | ||
public int getActiveStatus() { | ||
return activeStatus; | ||
} | ||
|
||
/** | ||
* @param status NEVER, SOMETIMES, or ALWAYS | ||
*/ | ||
@Override | ||
public void setActiveStatus(int status) { | ||
activeStatus = status; | ||
} | ||
|
||
@Override | ||
public void draw() { | ||
|
||
} | ||
|
||
@Override | ||
public void init(GLAutoDrawable glAutoDrawable) { | ||
|
||
} | ||
|
||
@Override | ||
public void dispose(GLAutoDrawable glAutoDrawable) { | ||
|
||
} | ||
|
||
@Override | ||
public void display(GLAutoDrawable glAutoDrawable) { | ||
|
||
} | ||
|
||
@Override | ||
public void reshape(GLAutoDrawable glAutoDrawable, int x, int y, int width, int height) { | ||
canvasWidth = width; | ||
canvasHeight = height; | ||
} | ||
} |
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
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
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
Oops, something went wrong.