Jump to content

Quake loader plugin can't load sprites


Go to solution Solved by Josh,

Recommended Posts

Posted

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;
}

 

Check out Slipgate Tactics demo, which is made with Ultra Engine/Leadwerks 5:

https://www.leadwerks.com/community/topic/61480-slipgate-tactics-demo/

Posted

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

Let's build cool stuff and have fun. :)

  • 7 months later...

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.

×
×
  • Create New...