Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kwang1imsa

Pages: [1] 2
1
DotNet / SFML 2.0 and .NET Binding
« on: July 19, 2011, 07:45:11 am »
Is it also possible to have precompiled versions up on the repository?

I am having some trouble with converstion to VS2010.

2
DotNet / LoaderLock
« on: July 19, 2011, 03:19:07 am »
Awesome. I have been looking for that for ages!

3
DotNet / LoaderLock
« on: July 18, 2011, 06:52:03 pm »
Ok, so here is how to reproduce:

This did not throw a LoaderLock exception for me, but all the same it hangs the application:

1. Start a new Windows Forms Project
2. Go into Form1() and write this:

Code: [Select]

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            new SFML.Graphics.Sprite();
        }

    }
}



The application hangs on my new computer, and shouldn't on my old.  If I comment out SFML.Graphics.Sprite, it will run fine.

EDIT: I have been using SFML 1.6 and I just realized that my new computer runs an ATI graphics card.

Is there a version of 2.0 I can get for .NET?[/code]

4
DotNet / LoaderLock
« on: July 18, 2011, 06:43:05 pm »
Ok. I understand.

A quick note to make, I tested this on 2 computers.  On one, the LoaderLock actually hangs the application, on the other, it is just thrown but can be ignored.

I will get something up shortly.

5
DotNet / LoaderLock
« on: July 18, 2011, 08:29:17 am »
Alright, sorry.  This is as much as I think is related to the issue.  I hope this supplement will cover it:

Main:
Code: [Select]
           Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.DoEvents();
            Application.Run((Form)new MainGui());


MainGui Constructor:
Code: [Select]

this.Hide();
                MainGui.root = this;
                this.splashScreen = new Splash();
                BackgroundWorker backgroundWorker = new BackgroundWorker();
                backgroundWorker.WorkerReportsProgress = true;
                backgroundWorker.DoWork += new DoWorkEventHandler(this.backgroundWorker1_DoWork);
                backgroundWorker.RunWorkerAsync();
                backgroundWorker.ReportProgress(this.loadState += 5);
               
                this.InitializeComponent();
                /*some irrelevant code here*/
                EnviroEditor enviroEditor = new EnviroEditor(par2); //<-- this contains GridEditGL
                this.loadState = 100;
                //System.Threading.Thread.Sleep(1000);
                ((Control)this).Show();


EnviroEdit Constructor:
Code: [Select]

public GridEditGL editor;
public EnviroEditor(EnviroBox par)
        {
            parent = par;
            InitializeComponent();
            editType.SelectedIndex = 0;
            teditor = new GridEdit(this);
            editor = new GridEditGL(this); //this is it <---
            Application.EnableVisualStyles();
            editor.tilelist = parent.tilelist;
            editor.objlist = parent.objlist;
            /*more irrelevant code*/
           
        }


I hope I didn't miss anything this time.  Thank you for keeping me company through this issue.[/code]

6
DotNet / LoaderLock
« on: July 17, 2011, 11:04:00 pm »
Oh sorry. I meant to say "that's what I did after your first response"  :lol:

Anyways, that is essentially everything that is giving me problems.  I am also experiencing it with SFML.Graphics.Image();.

This is the entire constructor of my class:

Code: [Select]
public class GridEditGL : Panel
    {
        private Sprite drawSpr;
        private Sprite objSpr;
        public Dictionary<string,Sprite> drawSprList = new Dictionary<string,Sprite>();
        public List<tile> tilelist = new List<tile>();
        public List<obj> objlist = new List<obj>();
        public Sprite bgSpr;
        public SFML.Graphics.Image bg;
        private string defaultEmpty = @"resources\engine\editor\images\empty.png";
        public EnviroEditor parent;
        public RenderWindow mainWin;
        public GridEditGL(EnviroEditor par)
        {
            this.parent = par;
            this.Size = new Size(320, 320);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            drawSpr = new Sprite();
            bg = new SFML.Graphics.Image();
            objSpr = new Sprite();
            bgSpr = new Sprite();
            timer = new Timer();
            mainWin = new RenderWindow(this.Handle);
            mainWin.PreserveOpenGLStates(true);
            mainWin.UseVerticalSync(true);
 
            updateSize();
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
            SetStyle(ControlStyles.Opaque, true);
            UpdateStyles();

        }


Edit: By the way, the class GridEditGL is created inside of the constructor of another class, which is created in the constructor of another class.

7
DotNet / LoaderLock
« on: July 16, 2011, 06:55:50 pm »
That's exactly what I do:

Code: [Select]
private Sprite drawSpr;

In the constructor:

Code: [Select]
drawSpr = new Sprite();

This is very odd. Am I doing something wrong?

8
DotNet / LoaderLock
« on: July 16, 2011, 06:54:38 am »
Thank you for the response.

How can I get around it? I am not familiar with MDAs.  How can I store a sprite without throwing it into a variable?

9
DotNet / LoaderLock
« on: July 15, 2011, 01:45:58 am »
Code: [Select]
private Sprite drawSpr = new Sprite();

In this line I am experiencing this error:

Quote
LoaderLock was detected:
Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
[/quote]

10
DotNet / FatalExecutionEngineError: Releasing a Handle
« on: July 14, 2011, 07:26:09 pm »
yes. did not work.

11
DotNet / FatalExecutionEngineError: Releasing a Handle
« on: July 14, 2011, 04:59:47 am »
So I have 2 windows, a window from OGRE3D and another from SFML.  I pass OGRE's window handle to SFML's and then proceed in my main application loop to pump messages through OGRE's window:

Code: [Select]

IntPtr hwnd;
OGREWin.GetCustomAttribute("WINDOW", out hwnd);
pl.Insert("WINDOW", hwnd.ToString());
SFMLWin = new SFML.Graphics.RenderWindow(hwnd); //hwnd is a pointer to OGREWin's handle
while (!OGREWin.IsClosed)
            {
                    WindowEventUtilities.MessagePump();
            }


Here is my problem, when I close OGRE's window, the method in my main application loop yells "FatalExecutionEngineError".  Is there a way to release SFMLWin's grasp on OGREWin's handle before this happens?[/code]

12
DotNet / Overlaying onto OGRE
« on: July 11, 2011, 11:28:48 pm »
I was wondering, is it possible to use SFML to draw an overlay onto what OGRE renders?  When I try it out, it seems like SFML clears the entire window when it draws.

13
DotNet / UseVerticalSync
« on: July 05, 2011, 05:49:22 am »
No, I know what VerticalSync is.

I mean, does it sleep the thread for any extra time between one draw time or another in the application's main while loop or what?

14
DotNet / UseVerticalSync
« on: July 05, 2011, 04:02:27 am »
I have been wondering, what exactly does useverticalsync do?

Does it simply effect the frequency of SFML's Display() function or does it insert a sleep() do delay the entire while loop that contains the draw function?

15
SFML projects / SPARK opensource particle engine with an SFML module
« on: July 04, 2011, 04:17:55 am »
any chance that this will get ported to SFML dotNet?

Pages: [1] 2