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:: Add Line Numbers


DLL Problem by jeickmann
//this is the code from the exe (in main()):

class Tmp : public WindowingEventHandler
{
public:
    void DrawFrame();
    RenderableSurface * r;
};

void Tmp::DrawFrame()
{
    unsigned char red = 0;
    glClearColor(((float)red/255.0f), 0.0f, 0.0f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    r->swap();
}

Windowing * w = loader.extractObject("getWindowing");

if(w != 0)
{
    Tmp handler;
       handler.r = w->createWindow(800, 600, false, &handler);
        cout << "YUP" << endl;
}

//and this is the stuff from the dll:
BOOL MFCGLApp::OnIdle(LONG lCount)
{
    handler->DrawFrame();
    return TRUE;
}