mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-24 01:52:24 -05:00
Fix Direct3D9Api not building, print graphics info in more concise way and print adapter description for Direct3D 9. Fixes chunk visibility not being recalculated after terrain atlas size changes, closes #34.
This commit is contained in:
parent
dab0e31bfc
commit
d053a3bf90
3 changed files with 14 additions and 10 deletions
|
@ -282,12 +282,12 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
indicesCount / 6 * 4, startIndex, NumPrimitives( indicesCount, mode ) );
|
||||
}
|
||||
|
||||
internal override void DrawIndexedVb_TrisT2fC4b( DrawMode mode, int indicesCount, int startIndex ) {
|
||||
internal override void DrawIndexedVb_TrisT2fC4b( int indicesCount, int startIndex ) {
|
||||
device.DrawIndexedPrimitives( PrimitiveType.TriangleList, 0, 0,
|
||||
indicesCount / 6 * 4, startIndex, indicesCount / 3 );
|
||||
}
|
||||
|
||||
internal override void DrawIndexedVb_TrisT2fC4b( DrawMode mode, int indicesCount, int startVertex, int startIndex ) {
|
||||
internal override void DrawIndexedVb_TrisT2fC4b( int indicesCount, int startVertex, int startIndex ) {
|
||||
device.DrawIndexedPrimitives( PrimitiveType.TriangleList, startVertex, 0,
|
||||
indicesCount / 6 * 4, startIndex, indicesCount / 3 );
|
||||
}
|
||||
|
@ -501,10 +501,12 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
}
|
||||
|
||||
public override void PrintApiSpecificInfo() {
|
||||
Utils.Log( "D3D tex memory available: " + (uint)device.AvailableTextureMemory );
|
||||
Utils.Log( "D3D vertex processing: " + createFlags );
|
||||
Utils.Log( "D3D depth buffer format: " + depthFormat );
|
||||
Utils.Log( "D3D device caps: " + caps.DeviceCaps );
|
||||
Utils.Log( "--Using Direct3D 9--" );
|
||||
Utils.Log( "Tex memory available: " + (uint)device.AvailableTextureMemory );
|
||||
Utils.Log( "Vertex processing mode: " + createFlags );
|
||||
Utils.Log( "Depth buffer format: " + depthFormat );
|
||||
Utils.Log( "Adapter description: " + d3d.Adapters[0].Details.Description );
|
||||
Utils.Log( "Device caps: " + caps.DeviceCaps );
|
||||
}
|
||||
|
||||
public unsafe override void TakeScreenshot( string output, Size size ) {
|
||||
|
|
|
@ -369,9 +369,10 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
}
|
||||
|
||||
public unsafe override void PrintApiSpecificInfo() {
|
||||
Utils.Log( "OpenGL vendor: " + new String( (sbyte*)GL.GetString( StringName.Vendor ) ) );
|
||||
Utils.Log( "OpenGL renderer: " + new String( (sbyte*)GL.GetString( StringName.Renderer ) ) );
|
||||
Utils.Log( "OpenGL version: " + new String( (sbyte*)GL.GetString( StringName.Version ) ) );
|
||||
Utils.Log( "--Using OpenGL--" );
|
||||
Utils.Log( "Vendor: " + new String( (sbyte*)GL.GetString( StringName.Vendor ) ) );
|
||||
Utils.Log( "Renderer: " + new String( (sbyte*)GL.GetString( StringName.Renderer ) ) );
|
||||
Utils.Log( "Version: " + new String( (sbyte*)GL.GetString( StringName.Version ) ) );
|
||||
int depthBits = 0;
|
||||
GL.GetIntegerv( GetPName.DepthBits, &depthBits );
|
||||
Utils.Log( "Depth buffer bits: " + depthBits );
|
||||
|
|
|
@ -76,8 +76,9 @@ namespace ClassicalSharp {
|
|||
bool fullResetRequired = elementsPerBitmap != game.TerrainAtlas1D.elementsPerBitmap;
|
||||
if( fullResetRequired ) {
|
||||
Refresh();
|
||||
chunkPos = new Vector3I( int.MaxValue, int.MaxValue, int.MaxValue );
|
||||
}
|
||||
elementsPerBitmap = game.TerrainAtlas1D.elementsPerBitmap;
|
||||
elementsPerBitmap = game.TerrainAtlas1D.elementsPerBitmap;
|
||||
}
|
||||
|
||||
void OnNewMap( object sender, EventArgs e ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue