mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-24 01:52:24 -05:00
Fix padding issues, also be more helpful when using 'OpenGL build with Intel GPU on windows.'
This commit is contained in:
parent
976aab75ab
commit
e51aefe4d7
5 changed files with 15 additions and 9 deletions
|
@ -231,6 +231,8 @@ namespace ClassicalSharp {
|
|||
|
||||
public void ReducePadding( ref Texture tex, int point ) {
|
||||
if( !UseBitmappedChat ) return;
|
||||
point = AdjTextSize( point );
|
||||
|
||||
int padding = (tex.Height - point) / 4;
|
||||
float vAdj = (float)padding / Utils.NextPowerOf2( tex.Height );
|
||||
tex.V1 += vAdj; tex.V2 -= vAdj;
|
||||
|
@ -239,6 +241,8 @@ namespace ClassicalSharp {
|
|||
|
||||
public void ReducePadding( ref int height, int point ) {
|
||||
if( !UseBitmappedChat ) return;
|
||||
point = AdjTextSize( point );
|
||||
|
||||
int padding = (height - point) / 4;
|
||||
height -= padding * 2;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ namespace ClassicalSharp.Audio {
|
|||
if( type == SoundType.None || monoOutputs == null )
|
||||
return;
|
||||
Sound snd = board.PickRandomSound( type );
|
||||
if( snd == null ) return;
|
||||
|
||||
chunk.Channels = snd.Channels;
|
||||
chunk.Frequency = snd.SampleRate;
|
||||
chunk.BitsPerSample = snd.BitsPerSample;
|
||||
|
|
|
@ -153,7 +153,10 @@ namespace ClassicalSharp {
|
|||
|
||||
LoadIcon();
|
||||
string connectString = "Connecting to " + IPAddress + ":" + Port + "..";
|
||||
Graphics.WarnIfNecessary( Chat );
|
||||
if( Graphics.WarnIfNecessary( Chat ) ) {
|
||||
MapBordersRenderer.SetUseLegacyMode( true );
|
||||
((StandardEnvRenderer)EnvRenderer).SetUseLegacyMode( true );
|
||||
}
|
||||
SetNewScreen( new LoadingMapScreen( this, connectString, "Waiting for handshake" ) );
|
||||
Network.Connect( IPAddress, Port );
|
||||
}
|
||||
|
|
|
@ -222,8 +222,7 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
}
|
||||
|
||||
/// <summary> Adds a warning to chat if this graphics API has problems with the current user's GPU. </summary>
|
||||
public virtual void WarnIfNecessary( Chat chat ) {
|
||||
}
|
||||
public virtual bool WarnIfNecessary( Chat chat ) { return false; }
|
||||
|
||||
/// <summary> Informs the graphic api to update its state in preparation for a new frame. </summary>
|
||||
public abstract void BeginFrame( Game game );
|
||||
|
|
|
@ -386,15 +386,13 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
isIntelRenderer = renderer.Contains( "Intel" );
|
||||
}
|
||||
|
||||
public override void WarnIfNecessary( Chat chat ) {
|
||||
if( !isIntelRenderer ) return;
|
||||
public override bool WarnIfNecessary( Chat chat ) {
|
||||
if( !isIntelRenderer ) return false;
|
||||
|
||||
chat.Add( "&cIntel graphics cards are known to have issues with the OpenGL build." );
|
||||
chat.Add( "&cVSync may not work, and you may see disappearing clouds and map edges." );
|
||||
chat.Add( " " );
|
||||
chat.Add( "&cFor Windows, try downloading the Direct3D 9 build as it doesn't have" );
|
||||
chat.Add( "&cthese problems. Alternatively, the disappearing graphics can be" );
|
||||
chat.Add( "&cpartially fixed by typing \"/client render legacy\" into chat." );
|
||||
chat.Add( "&cFor Windows, try downloading the Direct3D 9 build instead.");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Based on http://www.opentk.com/doc/graphics/save-opengl-rendering-to-disk
|
||||
|
|
Loading…
Add table
Reference in a new issue