PDA

View Full Version : exe and dll



coredump
09-19-2002, 05:08 AM
ok. i have a class to create a OpenGL window using Win32 (based off of NeHe). all the window does is draw a teapot and the mouse can make the teapot tumble (similar to the 3D perspective view on many 3D modelers, i.e. 3DStudio, Milkshape). as a standalone app, it works great. i can go fullscreen or windowed, resize the window, move it, etc. i am going to use this for a plugin for milkshape and it needs to be a dll. i made the DLL, and now when i move the window, i lose all mouse interactivity. do i have to do something special on a WM_MOVE? i've never noticed anything in any other NeHe tut on WM_MOVE. also, and this is a little OT, when i set up my DLL to capture the mouse, the standard arrow cursor gets replaced with an hourglass. i can still function as normal, but why the hourglass? thanks in advance!

EDIT: i am at work and thus am unable to post any code until i get home. but, as stated above, i used NeHe as a base and haven't added much Win32 code.

b

[This message has been edited by coredump (edited 09-19-2002).]

coredump
09-24-2002, 01:23 PM
i have narrowed the problem down to my resize function, shown below:



void GL_Window::resize(int w, int h)
{
width = w;
height = (h) ? h : 1;
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f, (GLfloat)width / (GLfloat)height, 1.0f, 1000.0f);
glMatrixMode(GL_MODELVIEW);
}


width & height are member variables in my GL_Window class. this is the same function i use in standalone opengl apps. but when used in a dll project, this causes the program to not respond. it happens when the window is moved or resized. any help?

b