Renamed dds textures to not contain strange characters that confuse Prebuild.
Added checks for extension support to SwizzledParallax sample.
This commit is contained in:
parent
038e140e41
commit
8e9ebf4fe1
5 changed files with 10 additions and 15 deletions
|
@ -41,7 +41,7 @@ namespace Examples.Tutorial
|
||||||
// Textures
|
// Textures
|
||||||
const TextureUnit TMU0_Unit = TextureUnit.Texture0;
|
const TextureUnit TMU0_Unit = TextureUnit.Texture0;
|
||||||
const int TMU0_UnitInteger = 0;
|
const int TMU0_UnitInteger = 0;
|
||||||
const string TMU0_Filename = "Data/Textures/Earth CubeMap.dds";
|
const string TMU0_Filename = "Data/Textures/earth-cubemap.dds";
|
||||||
uint TMU0_Handle;
|
uint TMU0_Handle;
|
||||||
TextureTarget TMU0_Target;
|
TextureTarget TMU0_Target;
|
||||||
|
|
||||||
|
|
|
@ -48,15 +48,13 @@ namespace Examples.Tutorial
|
||||||
// Textures
|
// Textures
|
||||||
const TextureUnit TMU0_Unit = TextureUnit.Texture0;
|
const TextureUnit TMU0_Unit = TextureUnit.Texture0;
|
||||||
const int TMU0_UnitInteger = 0;
|
const int TMU0_UnitInteger = 0;
|
||||||
//const string TMU0_Filename = "Data/Textures/Swizzled Metal Diffuse&Height.dds";
|
const string TMU0_Filename = "Data/Textures/swizzled-rock-diffuse-height.dds";
|
||||||
const string TMU0_Filename = "Data/Textures/Swizzled Rock Diffuse&Height.dds";
|
|
||||||
uint TMU0_Handle;
|
uint TMU0_Handle;
|
||||||
TextureTarget TMU0_Target;
|
TextureTarget TMU0_Target;
|
||||||
|
|
||||||
const TextureUnit TMU1_Unit = TextureUnit.Texture1;
|
const TextureUnit TMU1_Unit = TextureUnit.Texture1;
|
||||||
const int TMU1_UnitInteger = 1;
|
const int TMU1_UnitInteger = 1;
|
||||||
//const string TMU1_Filename = "Data/Textures/Swizzled Metal Normal&Gloss.dds";
|
const string TMU1_Filename = "Data/Textures/swizzled-rock-normal-gloss.dds";
|
||||||
const string TMU1_Filename = "Data/Textures/Swizzled Rock Normal&Gloss.dds";
|
|
||||||
uint TMU1_Handle;
|
uint TMU1_Handle;
|
||||||
TextureTarget TMU1_Target;
|
TextureTarget TMU1_Target;
|
||||||
|
|
||||||
|
@ -76,22 +74,19 @@ namespace Examples.Tutorial
|
||||||
{
|
{
|
||||||
this.VSync = VSyncMode.Off;
|
this.VSync = VSyncMode.Off;
|
||||||
|
|
||||||
/*
|
|
||||||
// Check for necessary capabilities:
|
// Check for necessary capabilities:
|
||||||
if ( !GL.SupportsExtension( "VERSION_2_0" ) )
|
string extensions = GL.GetString(StringName.Extensions);
|
||||||
|
if ( !GL.GetString(StringName.Extensions).Contains("GL_ARB_shading_language"))
|
||||||
{
|
{
|
||||||
MessageBox.Show( "You need at least OpenGL 2.0 to run this example. Aborting.",
|
throw new NotSupportedException(String.Format("This example requires OpenGL 2.0. Found {0}. Aborting.",
|
||||||
"GLSL not supported", MessageBoxButtons.OK, MessageBoxIcon.Exclamation );
|
GL.GetString(StringName.Version).Substring(0, 3)));
|
||||||
this.Exit( );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !GL.SupportsExtension( "GL_ARB_texture_compression" ) ||
|
if (!extensions.Contains("GL_ARB_texture_compression") ||
|
||||||
!GL.SupportsExtension( "GL_EXT_texture_compression_s3tc" ) )
|
!extensions.Contains("GL_EXT_texture_compression_s3tc"))
|
||||||
{
|
{
|
||||||
MessageBox.Show( "Texture compression extensions not found. Trying to run anyways.",
|
throw new NotSupportedException("This example requires support for texture compression. Aborting.");
|
||||||
"Possible problem", MessageBoxButtons.OK, MessageBoxIcon.Warning );
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
int[] temp = new int[1];
|
int[] temp = new int[1];
|
||||||
GL.GetInteger( GetPName.MaxTextureImageUnits, out temp[0] );
|
GL.GetInteger( GetPName.MaxTextureImageUnits, out temp[0] );
|
||||||
|
|
Loading…
Reference in a new issue