Compatibility problem on vista and seven

I have some problems with the distribution of a project that uses opengl.
The project is an mfc program.
I use opengl with immediate mode and on vista and seven on some machines see some incompatibility , like the position of the opengl model inside an mfc window for example.
How i can test and find the compatibility problems of opengl ?
I have these problem only on vista and seven.

I use opengl 2 an include these libs :


and include some of these files :

#include “gl\gl.h”
#include “gl\glu.h”
#include “gl\glaux.h”


Could you clarify what problem you’re actually having? Can you explain it in greater detail?

Thanks alfonse
I have an opengl instance in a mfc mdi child window in my company project.
In almost all customer wit almost all operating system and opengl driver all work fine , but in some win 7 64 bit, if i have a model in child window, the model is moved to the left bottom corner of the child window and scaled.
Is like if the camera changes it’s parameters, but i don’t understand why.

what happens if you maximimise the child mdi window?

The operating system doesn’t matter. GL is implemented at the graphics driver level. You might want to update your graphics card drivers. If it is Intel, it is highly likely to be buggy (They have a reputation for their lousy GL drivers).

Those lib files and headers files you mentions do not matter either.

How i can test and find the compatibility problems of opengl ?

You buy the video card. Install it. Run your program and watch or perhaps you write a program that analyzes the output. Of course, there are a lot of video cards and a lot of OSes and drivers version to test.

thanks BionicBytes , if maximize the child mdi window the model and the visualization return correct.
What can be?

Can you not ensure the child window remains maximised?
Otherwise you will have to compensate for the fact that windows is altering the transformation to NDC space based on the size if the child window.

thanks to all.
i think that my problem is in this function:

void CGLView::OnSize(UINT nType, int cx, int cy) 
	CView::OnSize(nType, cx, cy);
	// TODO: Add your message handler code here
	if ( 0 >= cx || 0 >= cy )
	// save the width and height of the current window
	m_WindowWidth = cx;
	m_WindowHeight = cy;

    // compute the aspect ratio
    // this will keep all dimension scales equal
    m_AspectRatio = (GLdouble)m_WindowWidth/(GLdouble)m_WindowHeight;


i see that in the inizialization i get values from 20 to 30 for(cx and cy)before the correct values , that are the values of the size of the window,and i think that is wrong, if i start or pass in the maximized mode these values are always correct and the window size and his visualizing is correct.
In the code i see that these values (cx and cy) are stored in m_WindowWidth and m_WindowHeight and used in all my opengl dialogs that use opengl.
may be?


yep, you’ll need to use a debugger to see what’s going on here.
You need to be certain of the window sizes and which variable is holding the size of the child windows before calling the function which sets the GL context window size.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.