some minor GL3 RenderSystem tweaking
This commit is contained in:
parent
749fa0a5f1
commit
4096a16846
@ -204,7 +204,7 @@ namespace ANX.Framework
|
||||
|
||||
//TODO: validate graphics device
|
||||
|
||||
this.graphicsDevice = new GraphicsDevice(deviceInformation.Adapter, deviceInformation.GraphicsProfile,deviceInformation.PresentationParameters);
|
||||
this.graphicsDevice = new GraphicsDevice(deviceInformation.Adapter, deviceInformation.GraphicsProfile, deviceInformation.PresentationParameters);
|
||||
GraphicsResourceTracker.Instance.UpdateGraphicsDeviceReference(this.graphicsDevice);
|
||||
|
||||
//TODO: hookup events
|
||||
|
@ -6,6 +6,7 @@ using ANX.RenderSystem.GL3.Helpers;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
using OpenTK.Platform;
|
||||
using OpenTK.Platform.X11;
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
@ -375,9 +376,12 @@ namespace ANX.RenderSystem.GL3
|
||||
}
|
||||
else
|
||||
{
|
||||
LinuxInterop.ResizeWindow(presentationParameters.DeviceWindowHandle,
|
||||
presentationParameters.BackBufferWidth,
|
||||
presentationParameters.BackBufferHeight);
|
||||
if (nativeWindowInfo != null)
|
||||
{
|
||||
LinuxInterop.ResizeWindow(IntPtr.Zero, presentationParameters.DeviceWindowHandle,
|
||||
presentationParameters.BackBufferWidth,
|
||||
presentationParameters.BackBufferHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -2,6 +2,7 @@ using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using OpenTK.Platform;
|
||||
using ANX.Framework.NonXNA;
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
@ -46,9 +47,8 @@ namespace ANX.RenderSystem.GL3.Helpers
|
||||
[DllImport("libX11")]
|
||||
private static extern int XPending(IntPtr diplay);
|
||||
|
||||
[DllImport("libX11")]
|
||||
private static extern void XResizeWindow(IntPtr display, IntPtr window,
|
||||
int width, int height);
|
||||
[DllImport("libX11", EntryPoint = "XResizeWindow")]
|
||||
private static extern void XResizeWindow(IntPtr display, IntPtr window, int width, int height);
|
||||
#endregion
|
||||
|
||||
#region GetStaticFieldValue
|
||||
@ -108,10 +108,17 @@ namespace ANX.RenderSystem.GL3.Helpers
|
||||
#endregion
|
||||
|
||||
#region ResizeWindow
|
||||
public static void ResizeWindow(IntPtr windowHandle, int backBufferWidth,
|
||||
public static void ResizeWindow(IntPtr display, IntPtr windowHandle, int backBufferWidth,
|
||||
int backBufferHeight)
|
||||
{
|
||||
XResizeWindow(IntPtr.Zero, windowHandle, backBufferWidth, backBufferHeight);
|
||||
try
|
||||
{
|
||||
XResizeWindow(display, windowHandle, backBufferWidth, backBufferHeight);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error("GL3 XResizeWindow", e);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
@ -62,9 +62,9 @@
|
||||
<Project>{068eb2e9-963c-4e1b-8831-e25011f11ffe}</Project>
|
||||
<Name>ANX.PlatformSystem.Windows</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10.csproj">
|
||||
<Project>{5be49183-2f6f-4527-ac90-d816911fcf90}</Project>
|
||||
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.GL3\ANX.RenderSystem.GL3.csproj">
|
||||
<Project>{eb8258e0-6741-4db9-b756-1ebdf67b1ed6}</Project>
|
||||
<Name>ANX.RenderSystem.GL3</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Null\ANX.SoundSystem.Null.csproj">
|
||||
<Project>{c4ddffff-595e-4089-b499-06f68caf2566}</Project>
|
||||
|
@ -53,10 +53,18 @@
|
||||
<Project>{49066074-3b7b-4a55-b122-6bd33ab73558}</Project>
|
||||
<Name>ANX.InputSystem.Standard</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Null\ANX.SoundSystem.Null.csproj">
|
||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.GL3\ANX.RenderSystem.GL3_Linux.csproj">
|
||||
<Project>{eb8258e0-6741-4db9-b756-1ebdf67b1ed6}</Project>
|
||||
<Name>ANX.RenderSystem.GL3</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Null\ANX.SoundSystem.Null_Linux.csproj">
|
||||
<Project>{c4ddffff-595e-4089-b499-06f68caf2566}</Project>
|
||||
<Name>ANX.SoundSystem.Null</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.OpenAL\ANX.SoundSystem.OpenAL_Linux.csproj">
|
||||
<Project>{14ef49ab-6d3f-458d-9d5c-d120b86edd7a}</Project>
|
||||
<Name>ANX.SoundSystem.OpenAL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="anx.ico" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user