This repository has been archived by the owner on Mar 18, 2019. It is now read-only.
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
4895fa2
commit f744dd1
Showing
7 changed files
with
186 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
varying vec4 color; | ||
|
||
void main() | ||
{ | ||
gl_FragColor = color; | ||
} |
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,27 @@ | ||
varying vec4 color; | ||
|
||
varying vec3 N; | ||
varying vec3 v; | ||
varying vec4 diffuse; | ||
varying vec4 spec; | ||
|
||
void main() | ||
{ | ||
vec4 diffuse; | ||
vec4 spec; | ||
vec4 ambient; | ||
|
||
v = vec3(gl_ModelViewMatrix * gl_Vertex); | ||
N = normalize(gl_NormalMatrix * gl_Normal); | ||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; | ||
|
||
vec3 L = normalize(gl_LightSource[0].position.xyz - v); | ||
vec3 E = normalize(-v); | ||
vec3 R = normalize(reflect(-L,N)); | ||
|
||
ambient = ambientMat; | ||
diffuse = clamp( diffuseMat * max(dot(N,L), 0.0) , 0.0, 1.0 ) ; | ||
spec = clamp ( specMat * pow(max(dot(R,E),0.0),0.3*specPow) , 0.0, 1.0 ); | ||
|
||
color = ambient + diffuse + spec; | ||
} |
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,26 @@ | ||
// SEVENENGINE LISCENSE: | ||
// You are free to use, modify, and distribute any or all code segments/files for any purpose | ||
// including commercial use under the following condition: any code using or originally taken | ||
// from the SevenEngine project must include citation to its original author(s) located at the | ||
// top of each source code file, or you may include a reference to the SevenEngine project as | ||
// a whole but you must include the current SevenEngine official website URL and logo. | ||
// - Thanks. :) (support: seven@sevenengine.com) | ||
|
||
// Author(s): | ||
// - Zachary Aaron Patten (aka Seven) seven@sevenengine.com | ||
// Last Edited: 11-16-13 | ||
|
||
using SevenEngine.DataStructures.Interfaces; | ||
|
||
namespace SevenEngine | ||
{ | ||
/// <summary>INHERIT ME!</summary> | ||
public interface InterfaceGameState : InterfaceStringId | ||
{ | ||
new string Id { get; set; } | ||
bool IsReady { get; } | ||
void Load(); | ||
string Update(float elapsedTime); | ||
void Render(); | ||
} | ||
} |
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,39 @@ | ||
// SEVENENGINE LISCENSE: | ||
// You are free to use, modify, and distribute any or all code segments/files for any purpose | ||
// including commercial use under the following condition: any code using or originally taken | ||
// from the SevenEngine project must include citation to its original author(s) located at the | ||
// top of each source code file, or you may include a reference to the SevenEngine project as | ||
// a whole but you must include the current SevenEngine official website URL and logo. | ||
// - Thanks. :) (support: seven@sevenengine.com) | ||
|
||
// Author(s): | ||
// - Zachary Aaron Patten (aka Seven) seven@sevenengine.com | ||
// Last Edited: 12-6-13 | ||
|
||
using System; | ||
using OpenTK; | ||
|
||
namespace SevenEngine | ||
{ | ||
/// <summary>Contains hardware constants for dynamic optimizatiions.</summary> | ||
public static class HardwareManager | ||
{ | ||
private static int _numberOfCores; | ||
private static int _monitorWidth; | ||
private static int _monitorHeight; | ||
|
||
/// <summary>Returns the number of logical cores on the current hardware.</summary> | ||
public static int LogicalCores { get { return _numberOfCores; } } | ||
/// <summary>Returns the width of the default monitor.</summary> | ||
public static int MonitorWidth { get { return _monitorWidth; } } | ||
/// <summary>Returns the height of the default monitor.</summary> | ||
public static int MonitorHeight { get { return _monitorHeight; } } | ||
|
||
public static void Initialize() | ||
{ | ||
_numberOfCores = System.Environment.ProcessorCount; | ||
_monitorWidth = OpenTK.DisplayDevice.Default.Width; | ||
_monitorHeight = OpenTK.DisplayDevice.Default.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SEVENENGINE LISCENSE: | ||
// You are free to use, modify, and distribute any or all code segments/files for any purpose | ||
// including commercial use under the following condition: any code using or originally taken | ||
// from the SevenEngine project must include citation to its original author(s) located at the | ||
// top of each source code file, or you may include a reference to the SevenEngine project as | ||
// a whole but you must include the current SevenEngine official website URL and logo. | ||
// - Thanks. :) (support: seven@sevenengine.com) | ||
|
||
// Author(s): | ||
// - Zachary Aaron Patten (aka Seven) seven@sevenengine.com | ||
// Last Edited: 11-28-13 | ||
|
||
using System; | ||
using SevenEngine.Mathematics; | ||
|
||
namespace SevenEngine.Physics | ||
{ | ||
public enum EnumMatterState { Solid, Liquid, Gas, Plasma } | ||
|
||
public class Matter | ||
{ | ||
protected Substance _substance; | ||
//protected Shape _space; | ||
|
||
protected Vector _acceleration; | ||
protected Vector _velocity; | ||
|
||
protected Quaternion _angularAccelteration; | ||
protected Quaternion _angularVelocity; | ||
|
||
protected float _tempurature; | ||
} | ||
} |
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,29 @@ | ||
// SEVENENGINE LISCENSE: | ||
// You are free to use, modify, and distribute any or all code segments/files for any purpose | ||
// including commercial use under the following condition: any code using or originally taken | ||
// from the SevenEngine project must include citation to its original author(s) located at the | ||
// top of each source code file, or you may include a reference to the SevenEngine project as | ||
// a whole but you must include the current SevenEngine official website URL and logo. | ||
// - Thanks. :) (support: seven@sevenengine.com) | ||
|
||
// Author(s): | ||
// - Zachary Aaron Patten (aka Seven) seven@sevenengine.com | ||
// Last Edited: 11-28-13 | ||
|
||
using System; | ||
|
||
namespace SevenEngine.Physics.Shapes | ||
{ | ||
public interface InterfaceShape | ||
{ | ||
float SurfaceArea { get; } | ||
float Volume { get; } | ||
|
||
float MinimumX { get; } | ||
float MinimumY { get; } | ||
float MinimumZ { get; } | ||
float MaximumX { get; } | ||
float MaximumY { get; } | ||
float MaximumZ { get; } | ||
} | ||
} |
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,26 @@ | ||
// SEVENENGINE LISCENSE: | ||
// You are free to use, modify, and distribute any or all code segments/files for any purpose | ||
// including commercial use under the following condition: any code using or originally taken | ||
// from the SevenEngine project must include citation to its original author(s) located at the | ||
// top of each source code file, or you may include a reference to the SevenEngine project as | ||
// a whole but you must include the current SevenEngine official website URL and logo. | ||
// - Thanks. :) (support: seven@sevenengine.com) | ||
|
||
// Author(s): | ||
// - Zachary Aaron Patten (aka Seven) seven@sevenengine.com | ||
// Last Edited: 11-28-13 | ||
|
||
using System; | ||
|
||
namespace SevenEngine.Physics | ||
{ | ||
public class Substance | ||
{ | ||
protected float _density; | ||
protected float _magnetism; | ||
protected float _radioactivity; | ||
protected float _conductivity; | ||
protected float _integrity; | ||
protected float _elasticity; | ||
} | ||
} |