monogame / monogame Goto Github PK
View Code? Open in Web Editor NEWOne framework for creating powerful cross-platform games.
Home Page: http://www.monogame.net
License: Other
One framework for creating powerful cross-platform games.
Home Page: http://www.monogame.net
License: Other
When i create a new DrawableGameComponent Object and than add it to my SceneManager i always get an Exception in:
\MonoGame\MonoGame.Framework\Windows\Game.cs
private void InitializeGameComponents()
{
foreach (GameComponent gc in _gameComponentCollection)
{
gc.Initialize();
}
}
System.InvalidOperationException wurde nicht behandelt.
Message=Die Auflistung wurde geändert. Der Enumerationsvorgang kann möglicherweise nicht ausgeführt werden.
Source=mscorlib
StackTrace:
bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
bei System.Collections.Generic.List1.Enumerator.MoveNextRare() bei System.Collections.Generic.List
1.Enumerator.MoveNext()
bei Microsoft.Xna.Framework.Game.InitializeGameComponents() in d:\GITs\MonoGame\monogame\MonoGame\MonoGame.Framework\Windows\Game.cs:Zeile 381.
bei Microsoft.Xna.Framework.Game.Update(GameTime gameTime) in d:\GITs\MonoGame\monogame\MonoGame\MonoGame.Framework\Windows\Game.cs:Zeile 405.
bei Microsoft.Xna.Framework.Game.DoUpdate(GameTime aGameTime) in d:\GITs\MonoGame\monogame\MonoGame\MonoGame.Framework\Windows\Game.cs:Zeile 194.
bei Microsoft.Xna.Framework.WindowsGameWindow.OnUpdateFrame(Object sender, FrameEventArgs e) in d:\GITs\MonoGame\monogame\MonoGame\MonoGame.Framework\Windows\WindowsGameWindow.cs:Zeile 561.
bei OpenTK.GameWindow.OnUpdateFrame(FrameEventArgs e)
bei OpenTK.GameWindow.OnUpdateFrameInternal(FrameEventArgs e)
bei OpenTK.GameWindow.RaiseUpdateFrame(Stopwatch update_watch, Double& next_update, FrameEventArgs update_args)
bei OpenTK.GameWindow.DispatchUpdateAndRenderFrame(Object sender, EventArgs e)
bei OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
bei OpenTK.GameWindow.Run(Double updateRate)
bei Microsoft.Xna.Framework.Game.Run() in d:\GITs\MonoGame\monogame\MonoGame\MonoGame.Framework\Windows\Game.cs:Zeile 184.
bei MemoryMadness.Program.Main(String[] args) in d:\GITs\MonoGame\monogame\EX1_BasicGameWithStateManagement\MemoryMadness\MemoryMadness\Program.cs:Zeile 26.
InnerException:
SampleCode:
Here is the Sample i used to convert it to Monogame. In XNA it works!
Level is an DrawableGameComponent Object.
private void InitializeLevel()
{
currentLevel = new Level(ScreenManager.Game,
ScreenManager.SpriteBatch,
currentLevelNumber, movesPerformed, buttonsTexture);
currentLevel.IsActive = true;
ScreenManager.Game.Components.Add(currentLevel);
}
download sample:
http://create.msdn.com/en-US/education/catalog/lab/memory_madness
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.drawablegamecomponent.aspx
Any hint how to fix this problem?
On iOS, the command Guide.BeginShowKeyboardInput doesn't work correctly.
A popup appears with 3 text fields that you can type, instead of one, and clicking on the "Done" button on the keyboard doesn't do anything.
Under the OpenGL ES 2.0 profile UserDrawPrimitives no longer work. As a result the Vector rumble SampleKit does not render.
The app does not crash but there are allot of Unsupported API call messages from OpenGL.
It is worth mentioning that it still works under the GL 1.1 profile.
It seems that MediaPlayer Queue property is not implemented in monogame
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.mediaplayer.queue.aspx
I can`t use a UIImagePickerController on the;
game.Services.GetService(typeof(UIViewController)) as UIViewController
When I try to do so I get a:
Error while processing the main game loop: Object reference not set to an instance of an object
at Microsoft.Xna.Framework.iOSGameWindow.get_ClientBounds ()
On later versions of MonoGame, when game.Window was a UIWindow, I could do this just perfectly. I don`t want to use a UIPopoverController... I would if it was fullscreen. Anyone knows a solution for this?
I've created a test case for LinearWrap:
https://github.com/danzel/WrapTest
(Do a checkout of MonoGame in MonoGame/)
(Press space or tap the screen to toggle between rendering scenes)
Sample screenshots are in output/
On MacOs and MS-XNA LinearWrap behaves as shown in the mac6[04].png screenshots.
On iOS LinearWrap works as shown in the ios6[04].png screenshots.
I sort of expect 60px images not to work as they are non power of 2 and get padded, but I'd expect 64px images to wrap correctly.
I'll take a look, but maybe someone who understands MonoGame better than me can find the issue :)
If you only have Portrait as the Supported Mode in device rotations, the screen goes black and the application becomes unresponsive.
Hey guys,
When the app is suspended in iOS by hitting the home button, the app crashes. The reason is there are GL calls occurring in GraphicsDevice.Present() while the app is in the background.
I fixed it in my fork (with help from Andrew Russell), but I'm not sure how you guys would prefer to solve this issue. Still not a github pro so not sure if I can pull request a single commit
NOTE: This does not manifest in the simulator for me, it occurs on the device itself.
Under the OpenGL ES 2.0 profile the platformer no longer renders correctly.
Rendering textures to a Rectangle causes unexpected behavior. Textures are stretched/positioned incorrectly.
So basically, I've ported my 3d block engine (http://www.voxeliq.org/) to monogame and with a few glitches, it's all great. The problem is that as monogame isn't 100% compatible with XNA 4.0 yet, I hit spots where i need that #monogame symbol. Let me explain in details;
As I'm working on a block engine with millions of blocks in memory, I'm using other threads to generate, lighten and build vertices.
So within the last step my code creates new VertexBuffer's in those off-threads which at the moment seems MonoGame/develop3d branch doesn't support and throws;
throw new NotImplementedException("Threaded creation of GPU resources is not currently supported on this platform");
So a solution I came with is adding #monogame symbol to my block engine's monogame version project and using as;
#if !MONOGAME
if (!this.CacheThreadStarted)
{
var cacheThread = new Thread(CacheThread) { IsBackground = true };
cacheThread.Start();
this.CacheThreadStarted = true;
}
#else
this.Process();
#endif
So wouldn't it be better if monogame framework project's define #monogame symbol on their own so for project that targets XNA and monogame together can differentiate the underlying framework?
http://monogame.codeplex.com/discussions/281277
When - in the android app lifecycle - you hit an onresume after an onstop because another app came forward I am seeing all the textures that were previously loaded being corrupt but any textures loaded from that point are fine.
I have an example where I basically load a texture that is 1024x768 and also create a RenderTarget that is 1024x768. I set the backbuffer to 768x1024 (iPad portrait) and then try to render the texture to the RenderTarget and rotating it to show.
This should display the complete texture, but it is cutoff at 768px width. So it seems the rendertarget cant be larger than the viewport.
/// <summary>
/// This is the main type for your game
/// </summary>
public class Game : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
int ScreenWidth = 768;
int ScreenHeight = 1024;
Texture2D debugTexture;
Texture2D screenTexture;
RenderTarget2D renderTarget;
public Game ()
{
graphics = new GraphicsDeviceManager (this);
Content.RootDirectory = "Content";
// setting the backbuffer to 768 x 1024 (iPad Portrait)
graphics.PreferredBackBufferWidth = ScreenWidth;
graphics.PreferredBackBufferHeight = ScreenHeight;
graphics.SupportedOrientations = DisplayOrientation.Portrait;
}
protected override void Initialize() {
// TODO: Add your initialization logic here
base.Initialize();
}
protected override void LoadContent ()
{
spriteBatch = new SpriteBatch (GraphicsDevice);
// loading a texture that is 1024x768 with marked corners
debugTexture = Content.Load<Texture2D> ("debug");
// Setting the rendertarget to 1024x768 (iPad Landscape)
renderTarget = new RenderTarget2D (GraphicsDevice, ScreenHeight, ScreenWidth);
}
protected override void UnloadContent() {
}
protected override void Update(GameTime gameTime) {
base.Update(gameTime);
}
protected override void Draw (GameTime gameTime)
{
// Setting the rendertarget to our 1024x768
GraphicsDevice.SetRenderTarget (renderTarget);
GraphicsDevice.Clear (Color.Green);
spriteBatch.Begin ();
// Drawing our texture to the rendertarget (1024x768)
spriteBatch.Draw (debugTexture, renderTarget.Bounds, Color.White);
spriteBatch.End ();
// Clearing the backbuffer
GraphicsDevice.SetRenderTarget (null);
GraphicsDevice.Clear (Color.Green);
// Setting our temporary texture to the newly drawn rendertarget (1024x768)
screenTexture = (Texture2D)renderTarget;
spriteBatch.Begin ();
// drawing the texture to screen and rotating it to show that it is cut off
// this should show the complete texture when rotating, instead it only shows 768px of it
spriteBatch.Draw (screenTexture, Vector2.Zero, null, Color.White, MathHelper.ToRadians ((float)gameTime.TotalGameTime.TotalSeconds), Vector2.Zero, Vector2.One, SpriteEffects.None, 0f);
spriteBatch.End ();
base.Draw (gameTime);
}
}
Load up the port Input sample. In portrait mode, the Touch location is virtually spot on in the simulator
When you rotate to landscape mode, the touch location appears off to the right.
When I try to use the StorageDevice/StorageContainer ON THE DEVICE it throws a ExecutionEngineException...
Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper runtime-invoke) :runtime_invoke_object__this___Nullable`1_int_int (object,intptr,intptr,intptr)' while running with --aot-only.
[ERROR] FATAL UNHANDLED EXCEPTION: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper runtime-invoke) :runtime_invoke_object__this___Nullable`1_int_int (object,intptr,intptr,intptr)' while running with --aot-only.
This happens only when linking on the device.
First I tried to use the StorageDevice/StorageContainer on my game, then it didn't worked, so I tried running the AlienGame StarterKit, newest version, and it was also not as working, so the StarterKit also has this bug.
Currently Scissoring is only called once , during the End() call. Apparently XNA allows multiple scissor calls between Begin/End blocks.
Hello all, let me first say I am new to github and MonoGame so pardon my ignorance. If it helps, I am here for MonoGame and thank you for all your hard work. So sorry if this doesn't belong in "issues"
I have summarized my issue on pastebin: http://pastebin.com/sur9L8Ky
My platform details:
Windows 7 x64 with MonoDevelop 2.4
Sound/Music does not stop when minimizing applications.
There's a massive memory leak when reloading textures after the context is lost. It seems that when the application is put into the background, it doesn't lose any memory consumption. But when returning and the opengl textures are recreated, the memory is added to the existing memory footprint. Eventually, the application crashes because it's consumed to much memory.
Hi guys,
i am facing two problems with MonoGame for Android when deploying on a real device.
Development Device/Informations:
When porting a Windows Phone XNA game to Android using MonoDroid/MonoGame, the game is working fine, load quickly and everything works well in the emulator.
However, when deploying on a real device i am facing these two problems:
Thanks in advance!
I am trying to port a game to Linux but unable to successfully compile MonoGame because some assemblies in the ThirdParty/GamepadConfig folder in particular GamepadBridge are not signed with a strong name and is preventing me from compiling the dlls with Mono from Linux. In addition there is no source code for the assemblies in GamepadConfig in order to sign it.
Error CS1577: Referenced assembly `GamepadBridge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name (CS1577) (MonoGame.Framework.Linux)
There is a problem with the LZxDecode under android , Here is the stack trace and a link to the test project.
System.Diagnostics.Debugger.Mono_UnhandledException (Parameters=) in /home/jon/Development/xamarin/mono/mcs/class/corlib/System.Diagnostics/Debugger.cs:124
System.Object.817f673d-fa27-427f-bd3c-83536ddb0844 (Parameters=) in
Android.Runtime.InputStreamInvoker.get_Position (Parameters=) in /home/jpobst/Desktop/monodroid/Mono.Android/src/Runtime/InputStreamInvoker.cs:50
Microsoft.Xna.Framework.Content.LzxDecoder.Decompress (inData=, inLen=, outData=, outLen=) in c:\Sandbox\Development\MonoGame\MonoGame.Framework\Content\LzxDecoder.cs:126
Microsoft.Xna.Framework.Content.ContentManager.ReadAsset (Parameters=) in c:\Sandbox\Development\MonoGame\MonoGame.Framework\Content\ContentManager.cs:278
Microsoft.Xna.Framework.Content.ContentManager.Load (Parameters=) in c:\Sandbox\Development\MonoGame\MonoGame.Framework\Content\ContentManager.cs:139
Test.Game1.LoadContent (Parameters=) in c:\Users\d_ellis\Desktop\Test\Game1.cs:22
Microsoft.Xna.Framework.Game.Initialize (Parameters=) in c:\Sandbox\Development\MonoGame\MonoGame.Framework\Android\Game.cs:372
Microsoft.Xna.Framework.Game.DoUpdate (Parameters=) in c:\Sandbox\Development\MonoGame\MonoGame.Framework\Android\Game.cs:200
Microsoft.Xna.Framework.AndroidGameWindow.OnUpdateFrame (Parameters=) in c:\Sandbox\Development\MonoGame\MonoGame.Framework\Android\AndroidGameWindow.cs:190
OpenTK.Platform.Android.AndroidGameView.RunIteration (Parameters=) in /home/jpobst/Desktop/monodroid/OpenGLES/OpenTK/Platform/Android/AndroidGameView.cs:1207
OpenTK.Platform.Android.RepeatTimerTask.Run (Parameters=) in /home/jpobst/Desktop/monodroid/OpenGLES/OpenTK/Platform/Android/AndroidGameView.cs:1668
Java.Util.TimerTask.n_Run (Parameters=) in /home/jpobst/Desktop/monodroid/Mono.Android/platforms/android-8/src/generated/Java.Util.TimerTask.cs:80
System.Object.817f673d-fa27-427f-bd3c-83536ddb0844 (Parameters=) in
http://liquidfirearts.com/download/Test.zip
Looks like the underlying Stream does not support the Position property.
The Getting Started Guides should be reviewed for accuracy and completeness with reference to the changes in 3.0.
Just to do some tests I have exeuted Microsofts XNA sample "Shooter" on Windows 7, Windows Phone 7 and iPhone (using Monogame).
Besides the fact the Monogame runs the game in portrait instead of landscape, I have noticed that the movement of the player sprite behaves really different.
On Phone 7, you tap anywhere, keep your finger on the screen and while moving it, the sprite follows the movement relative to the finger.
On iPhone however, the sprite first doesn't move at all, then moves extremely fast and moves up to the screens bounds. This makes the player uncontrollable.
The code used is:
while ( TouchPanel.IsGestureAvailable )
{
GestureSample gesture = TouchPanel.ReadGesture();
if ( gesture.GestureType == GestureType.FreeDrag )
{
player.Position += gesture.Delta;
}
}
Does that have to be different for iOS?
A missing reference to Microsoft.Xna.Framework.Graphics.VertexPositionColorTexture in MonoGame came up when debugging Krypton XNA
I use the crap out of the following in my game
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, myCamera.View);
spriteBatch.Draw(someStuff);
and the camera's view matrix is not being applied.
I'm pretty sure the fix is pretty trivial, i think you change this in SpriteBatch.UpdateWorldMatrixOrientation() ~ln 507
from this:
matViewScreen =
Matrix.CreateRotationZ((float)Math.PI) *
Matrix.CreateRotationY((float)Math.PI) *
Matrix.CreateTranslation(-viewport.Width / 2, viewport.Height / 2, 1);
to this:
matViewScreen =
_matrix *
Matrix.CreateRotationZ((float)Math.PI) *
Matrix.CreateRotationY((float)Math.PI) *
Matrix.CreateTranslation(-viewport.Width / 2, viewport.Height / 2, 1);
There seems to be a big problem with the Orientation change stuff on Android. After reading the documentation the Activity is re-created each time the Orientation/Configuration changes. The means the Game object is being re-created each time, so all the assets are loaded again and again and again each time the orientation changes.
We need to figure out a way to detect this and keep the same game object/ content manager around and just swap out the Activity/ AndroidGameView.
This will not effect people who just use a fixed screen orientation for games as the orientation will not change. however this might be the cause of the Resume issue we have been seeing as well.
When you call MediaPlayer.Play(song); it does not stops the old song if there is one.
Hi,
the README states to "Drag and Drop the directory MonoDevelop.MonoGame.1.6.0 into ~/.config/MonoDevelop/addins" to install the Monogame templates.
However, this no longer works.
Here's the reply from Xamarin regarding this issue:
The ~/.config/MonoDevelop was used for MD 2.4 and earlier, but we migrated to a new layout in 2.6 and later: http://monodevelop.com/Developers/Articles/User_Profiles. In particular, addins for MD 2.8 on Mac would go in ~/Library/Application Support/MonoDevelop-2.8/Addins. However, it would be better for MonoGame to convert their addin into an mpack package using "mdtool setup pack", so that it could be installed via the Addin Manager.
A pass through the current "Getting Started" materials is needed. Make sure all the material that exists is correct and applicable.
Load up the Draw2D or Orientation sample under iOS, in Portrait mode everything appears to draw correctly, however when you switch to Landscape mode everything looks stretched.
On Windows the GamePlay screen for this sample is all White.
Need to find out why this does not look right, the menu system is working fine.
A script to convert existing XNA projects to MonoGame projects would ease the transition for developers significantly.
In XNA, the return value of TouchCollection.FindById() is a bool. In MonoGame it is an int. MonoGame should be updated to match XNA.
JeRET over on the discussion forums ( http://monogame.codeplex.com/discussions/319657 ) , posted this...
" have another problem: when I call Guide.BeginShowKeyboard(), I see my Title three times, I can edit the top two fields and the ok-button is not at the correct position.
My Title is "Your Nickname" and my description is string.Empty. (another bug: while you can pass null on windows phone for one of these, it crashes under iOS).
When I managed to click the ok button (which doesn't work all the time), I receive a System.InvalidOperationException In Guide.ShowKeyboardInput():
result = ((UIAlertView) sender).Subviews.OfType<UITextField>().Single().Text;
here is an image of what i see before pressing ok:
User fuleshu followed up with...
"
I ran into the same problem. Therefore I tried today's developer branch from GitHub, where there have been a lot of changes concerning this code.
But I found the following problem with the developer branch code:
When I open the Guide with Guide.BeginShowKeyboardInput I run into an exception thrown at:
iOSGameWindow - Line 94
It is where the ClientBounds property is requested and it runs into a null at _viewController.View.Window
I tried to find why Window is null, but I couldn't. I guess that probably when the text input view is opened, the main game window gets invalid. Unfortunately I have no understanding of iOS View, UI etc.
However, when I insert:
if (_viewController.View.Window == null)
{
return new Rectangle(0,0,0,0);
}
then everything runs fine.
I guess it is a hotfix that works fine for me now, but doesn't solve the bug at the right place.
"
Though rotation is now working correctly when iOS applications start in Portrait and are turned to other orientations, starting out in orientations that are not Portrait isn't working correctly in all cases.
What happened to retina display (@2x) files? They are not loading anymore on newer versions?
We need to split out the Networking and GamerServices into seperate projects so that the code MonoGame.Framework does not have a direct dependency.
This will mean users not using networking will not need to reference the dlls.
When using a RenderTarget and calling spriteBatch.Begin() with a matrix to handle rotation, the matrix is not applied, it is drawn without rotation.
Have tested this on iOS and Windows, but the problem seems to be only on iOS.
protected override void Draw (GameTime gameTime)
{
GraphicsDevice.Clear (Color.CornflowerBlue);
Rectangle bound1 = new Rectangle (0, 0, width, height);
GraphicsDevice.SetRenderTarget (render);
GraphicsDevice.Clear (Color.CornflowerBlue);
spriteBatch.Begin (SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, Matrix.CreateRotationZ ((float)gameTime.TotalGameTime.TotalSeconds * 4));
spriteBatch.Draw (debug, bound1, new Color (1, 0, 0, 0.5f));
spriteBatch.End ();
GraphicsDevice.SetRenderTarget (null);
GraphicsDevice.Clear (Color.CornflowerBlue);
Texture2D final = (Texture2D)render;
spriteBatch.Begin ();
spriteBatch.Draw (final, bound1, Color.White);
spriteBatch.End ();
base.Draw (gameTime);
}
I had problems building the iOS Fx. Looks like improper cast between OpenTK.Matrix4 and Xna.Matrix. Just added the extension method locally:
public static class MatrixConvert
{
public static Matrix ToXnaMatrix(this Matrix4 m)
{
return new Matrix(m.M11,m.M12,m.M13,m.M14,m.M21,m.M22,m.M23,m.M24,m.M31,m.M32,m.M33,m.M34,m.M41,m.M42,m.M43,m.M44);
}
}
And then corrected the multiplications to use it:
lastDisplayOrientation = DisplayOrientation.Unknown;
UpdateWorldMatrixOrientation();
lastDisplayOrientation = graphicsDevice.PresentationParameters.DisplayOrientation;
matViewScreen = (Matrix4.CreateRotationZ((float)Math.PI)*
Matrix4.CreateRotationY((float)Math.PI)*
Matrix4.CreateTranslation(-this.graphicsDevice.Viewport.Width/2,
this.graphicsDevice.Viewport.Height/2,
1)).ToXnaMatrix(); // <---
matViewFramebuffer = Matrix4.CreateTranslation(-this.graphicsDevice.Viewport.Width/2,
-this.graphicsDevice.Viewport.Height/2,
1).ToXnaMatrix(); // <--
matProjection = Matrix4.CreateOrthographic(this.graphicsDevice.Viewport.Width,
this.graphicsDevice.Viewport.Height,
-1f,1f).ToXnaMatrix(); // <---
matWVPScreen = matViewScreen * matProjection;
matWVPFramebuffer = matViewFramebuffer * matProjection;
Tested KryptonXNA http://krypton.codeplex.com/ lighting engine with MonoGame and got some errors. Hope this helps.
Error 21 'Microsoft.Xna.Framework.Graphics.GraphicsDevice' does not contain a definition for 'GetRenderTargets' and no extension method 'GetRenderTargets' accepting a first argument of type 'Microsoft.Xna.Framework.Graphics.GraphicsDevice' could be found (are you missing a using directive or an assembly reference?) KryptonEngine.cs 263 52 Krypton
Error 17 Argument 1: cannot convert from 'ref var.Position' to 'ref Microsoft.Xna.Framework.Vector3' KryptonRenderHelper.cs 261 50 Krypton
Error 18 Argument 2: cannot convert from 'ref Microsoft.Xna.Framework.Matrix' to 'ref Microsoft.Xna.Framework.Quaternion' KryptonRenderHelper.cs 261 64 Krypton
Error 19 Argument 3: cannot convert from 'out var.Position' to 'out Microsoft.Xna.Framework.Vector3' KryptonRenderHelper.cs 261 78 Krypton
Error 16 The best overloaded method match for 'Microsoft.Xna.Framework.Vector3.Transform(ref Microsoft.Xna.Framework.Vector3, ref Microsoft.Xna.Framework.Quaternion, out Microsoft.Xna.Framework.Vector3)' has some invalid arguments KryptonRenderHelper.cs 261 21 Krypton
Error 1 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 154 28 Krypton
Error 2 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 156 21 Krypton
Error 3 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 162 21 Krypton
Error 4 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 168 21 Krypton
Error 5 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 174 21 Krypton
Error 6 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 182 53 Krypton
Error 7 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 206 17 Krypton
Error 8 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 209 32 Krypton
Error 9 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 211 21 Krypton
Error 10 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 217 21 Krypton
Error 11 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 223 21 Krypton
Error 12 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 229 21 Krypton
Error 13 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 235 21 Krypton
Error 14 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 241 21 Krypton
Error 15 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 247 21 Krypton
Error 20 The type or namespace name 'VertexPositionColorTexture' could not be found (are you missing a using directive or an assembly reference?) KryptonRenderHelper.cs 301 64 Krypton
Creating a Viewport at {0, 0} (other coordinates too, of course) and rendering into it in XNA results in the texture being rendered starting at {0, 0} (top-left). MonoGame currently renders to the lower-left (OpenGL's default origin?)
When setting RenderTarget and using more than one spriteBatch.Begin() and spriteBatch.End() call during Draw() only the last call is drawn to the RenderTarget.
This seems to happen on iOS but not on Windows, those are the only platforms I have tested.
protected override void Draw (GameTime gameTime)
{
GraphicsDevice.Clear (Color.CornflowerBlue);
Rectangle bound1 = new Rectangle (0, 0, width, height);
Rectangle bound2 = new Rectangle (5, 5, width, height);
GraphicsDevice.SetRenderTarget (render);
GraphicsDevice.Clear (Color.CornflowerBlue);
spriteBatch.Begin ();
spriteBatch.Draw (debug, bound1, Color.White);
spriteBatch.End ();
spriteBatch.Begin (SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, Matrix.Identity);
spriteBatch.Draw (debug, bound2, new Color (1, 0, 0, 0.5f));
spriteBatch.End ();
GraphicsDevice.SetRenderTarget (null);
GraphicsDevice.Clear (Color.CornflowerBlue);
Texture2D final = (Texture2D)render;
spriteBatch.Begin ();
spriteBatch.Draw (final, bound1, Color.White);
spriteBatch.End ();
base.Draw (gameTime);
}
In porting the source for my new game to MonoGame I hit the following issue. In Microsoft XNA Game Studio 4.0
Build 4.0.30901.0 the IUpdateable interface has the EnabledChanged and UpdatedOrderChange events defined using EventHandler:
event EventHandler<EventArgs> EnabledChanged;
event EventHandler<EventArgs> UpdateOrderChanged;
in MonoGame's IUpdateable they are defined using the untemplated EventHandler class:
event EventHandler EnabledChanged;
event EventHandler UpdateOrderChanged;
This is a compilation error and prevents smooth porting. Is there any reason this cannot be fixed in the MonoGame sources?
Tapping the screen triggers the drag event and release and then a moment later the OnSingleTapConfirmed is thrown. I think this should be an either/or relationship. Also, the drag event should have a minimum movement requirement before triggering so just tapping the screen doesn't drag.
I'm currently trying the XNA tutorial from this site: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Positioning_images.php
However it seems that the textures aren't resizes to the PreferredBackBuffer[Width|Height] or the full Graphics areN#t set to this size as device.PresentationParameters.BackBufferWidth outputs something dfferent from what I set.
My version is the latest git develop and OS is Linux (Fedora 16). If you need more info, please tell me!
The music track only seems to pause instead of stopping.
Under the gLES 1.1 profile the texture coordinates of some of the animations are not working correclty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.