Jump to content

Quake loader plugin can't load sprites


Dreikblack
 Share

Recommended Posts

Error: Failed to load texture "progs/s_explod.spr"

rerelase pak0.pak

Quad model loads without errors in a console in this example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    //Get the displays
    auto displays = GetDisplays();

    //Create a window
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);

    //Create framebuffer
    auto framebuffer = CreateFramebuffer(window);

    auto plg = LoadPlugin("Plugins/FITextureLoader");
    auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader");

    WString path = AppDir();
    auto pak = LoadPackage(path + "/PAK0.PAK");

    //Create world
    auto world = CreateWorld();

    //Create a camera
    auto camera = CreateCamera(world);
    camera->SetClearColor(0.125);
    camera->SetPosition(0, 0, -4);

    //Create a light
    auto light = CreateBoxLight(world);
    light->SetRotation(45, 35, 0);
    light->SetRange(-10, 10);
    light->SetColor(2);

    auto box = CreateBox(world, 1);

    auto pixmap = CreatePixmap(100, 100);
    pixmap->Fill(Vec4(0.5f, 0.5f, 0.5f, 1.0f));
    auto texture = LoadTexture("progs/s_explod.spr");
    auto model = LoadModel(world, "progs/quaddama.mdl");
    auto material = CreateMaterial();
    material->SetTexture(texture);
    material->SetShadow(false);
    material->SetTransparent(true);
    //Create sprite
    auto sprite = CreateSprite(world, 10, 10);
    sprite->SetPosition(0, 0, 0);
    sprite->SetMaterial(material);
    box->SetMaterial(material);

    //Main loop
    while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false)
    {
        world->Update();
        world->Render(framebuffer);
    }
    return 0;
}

 

Link to comment
Share on other sites

I need to trim some things down in order to focus and make progress.

The Quake plugin will be removed from the distribution and will no longer be supported, but the source code is available here:
https://github.com/UltraEngine/PluginSDK/tree/master/Plugins/Quake Loader

  • Sad 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Sorry, but I have to trim things that are holding me back from finishing the vegetation system, particles, and decals. It's hard for me to justify spending more time on Quake files. I sent a PM, feel free to discuss with me.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...