About Store Forum Documentation Contact



Post Reply 
A problem with gfx files.
Author Message
hck Offline
Member

Post: #1
A problem with gfx files.
Hi,
When I am running my application which uses sample world from SDK, I got error: "Can't load "mesh.gfx" Additional path: grass/0". I always have error about .gfx file when I use any builded world.
I run my application from general SDK dir. What is it?
10-17-2009 10:01 AM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #2
RE: A problem with gfx files.
Maybe remove all folders and install again or make another copy of EsenthelEngine, build project and run.
10-17-2009 10:14 AM
Find all posts by this user Quote this message in a reply
Barthap Offline
Member

Post: #3
RE: A problem with gfx files.
I have had the same problem and I rebuilded project and it was OK
10-17-2009 10:36 AM
Find all posts by this user Quote this message in a reply
hck Offline
Member

Post: #4
RE: A problem with gfx files.
SKD reinstall and project rebuild didn't help.
From what folder you are running app?
And when you load world:
Game::World.New("..");
What path do you have there?
(This post was last modified: 10-17-2009 11:03 AM by hck.)
10-17-2009 10:50 AM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #5
RE: A problem with gfx files.
(10-17-2009 10:50 AM)hck Wrote:  A w ogóle to cały ten system zrąbany jest. Zmieńcie to, bo tworzenie projektów w folderze SDK nie jest fajne. To pierwsza rzecz. Druga jest taka, wyłączcie w World Editorze zapamiętywanie ścieżek! Miałem sobie projekt w folderze x, przeniosłem go do y i teraz gdy zapisuję sobie świat dialog zapisu jest w folderze x i tworzy mi tam te wszystkie folder Mtrl, Mesh, World itd. ale ja tego nie chcę!

In EsenthelEngineSDK\Tool you've got file path.txt Edit this file and write paht to your application e.g. C:\My Game. Editors automatically will make you Mtrl, Obj etc. folders in C:\My Game, and there will be your all project. So you can have your project anywhere you want, not as you wrote only in SDK catalog smile
(This post was last modified: 10-17-2009 11:39 AM by Harry.)
10-17-2009 11:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
hck Offline
Member

Post: #6
RE: A problem with gfx files.
Ok, thx but still not working.
I deleted all files and I created new VS project in G:\gra. I copied whole Data folder from SDK to G:\gra\Debug\Data and I compiled my app.
Code:
Code:
#include <EsenthelEngine/EsenthelEngine.h>
#include "enum/_enums.h"

void InitPre()
{
    App.name("Jakis app");
    App.icon = NULL;
    App.flag = APP_NO_FX;
    IOPath("data/");
    PakAdd("engine.pak");
}

bool Init()
{
    return true;
}

void Shut()
{
}

bool Main()
{
    if(Kb.b(KB_ESC))
        return false;

    return true;
}

void Draw()
{
    D.clear(TURQ);
    D.text (0, 0.1,"This is the First Tutorial");
}

int main()
{
    InitPre();
    Init();

    while(1)
    {
        if(!Main())
            break;

        Draw();
    }

    return 0;
}
And now when I'm running my app, I got unhadled exception at D.clear(TURQ); I added all libs from tutorial project.
(This post was last modified: 10-17-2009 01:42 PM by hck.)
10-17-2009 01:10 PM
Find all posts by this user Quote this message in a reply
hck Offline
Member

Post: #7
RE: A problem with gfx files.
Come on people! Help me.
10-17-2009 04:11 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: A problem with gfx files.
Code:
int main()
{
    InitPre();
    Init();

    while(1)
    {
        if(!Main())
            break;

        Draw();
    }

    return 0;
}

this code is invalid, please refer to the tutorials
10-17-2009 04:16 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: A problem with gfx files.
also
Quote:I copied whole Data folder from SDK to G:\gra\Debug\Data
you don't copy it to G:\gra\Debug\Data, but to G:\gra\Data
10-17-2009 04:24 PM
Find all posts by this user Quote this message in a reply
hck Offline
Member

Post: #10
RE: A problem with gfx files.
(10-17-2009 04:24 PM)Esenthel Wrote:  also
Quote:I copied whole Data folder from SDK to G:\gra\Debug\Data
you don't copy it to G:\gra\Debug\Data, but to G:\gra\Data
I prefer copy it there, is it any problem?

Quote:this code is invalid, please refer to the tutorials
There is not main function in tutorial.
Oh, sorry. I just created console application and now I see it must be windows app.
It fixed all my problems.
(This post was last modified: 10-17-2009 05:08 PM by hck.)
10-17-2009 04:57 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #11
RE: A problem with gfx files.
Quote:There is not main function in tutorial.
there is in mine? :S
every tutorial should have the following functions:
void PreInit()
Bool Init()
Bool Main()
void Draw()

and you dont need to call PreInit(), an Init() in the main. its called automaticly
Main() is the update function, and is called everytime your game update (60Hz i believe?)
10-17-2009 05:06 PM
Find all posts by this user Quote this message in a reply
hck Offline
Member

Post: #12
RE: A problem with gfx files.
Yes, there is main but not "normal" main.
Any way. I fixed all my problems.
10-17-2009 05:09 PM
Find all posts by this user Quote this message in a reply
craksy Offline
Member

Post: #13
RE: A problem with gfx files.
a "normal main" (i suppose you mean a int main() as in a windows app) is not needed as everything is handled by the engine.
Quote:Any way. I fixed all my problems.
great grin
10-17-2009 05:14 PM
Find all posts by this user Quote this message in a reply
Post Reply