GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by Anonymous
1
 
#pragma once

#include <windows.h>
#include "d3dheader.h"
#include <string>

using std::string;

#define EXPORT extern "C" __declspec(dllexport)

#pragma pack (push,4)

// Common exit codes:
enum EXITCODE
{
    EXIT_OK,
    EXIT_CANT_CREATE_WINDOW,
    EXIT_BAD_CAPS,
    EXIT_CANT_CREATE_DEVICE,
    EXIT_CANT_ALLOC_RESOURCES,
    EXIT_NOTHING,
    EXIT_ERROR
};


struct TESTVERSION
{
    unsigned int high;
    unsigned int low;
    const char* name;
};

EXPORT TESTVERSION GetTestVersion ();
typedef TESTVERSION (*GetTestVersionP) ();

struct Vector3
{
    float x,y,z;
};

struct __declspec(dllexport) IParamsManager
{
    virtual void RegisterIntParam (const string& name, int* param, 
        const string& secton = "") = 0;
    virtual void RegisterFloatParam (const string& name, float* param, 
        const string& secton = "") = 0;
    virtual void RegisterVectorParam (const string& name, Vector3* param, 
        const string& secton = "") = 0;
    virtual void RegisterStringParam (const string& name, string* param, 
        const string& section = "") = 0;

    virtual void RegisterIntOut (const string& name, int* param, 
        const string& secton = "") = 0;
    virtual void RegisterFloatOut (const string& name, float* param, 
        const string& secton = "") = 0;
    virtual void RegisterVectorOut (const string& name, Vector3* param, 
        const string& secton = "") = 0;
    virtual void RegisterStringOut (const string& name, string* param, 
        const string& section = "") = 0;
};

EXPORT void SetupParams (IParamsManager* p);
typedef void (*SetupParamsP) (IParamsManager*);

EXPORT EXITCODE Run ();
typedef EXITCODE (*RunP) ();

#pragma pack (pop)