 |
|
 |
Hi I've downloaded this project and I don't see anything when I run it in IE and the Active X Text Container. I've debugged it and noticed that OpenGL is never initialized because OnCreate is never called. Can someone please tell me how to get this project working?
|
|
|
|
 |
|
 |
Hi All,
At Eximion we create web games on our own player. For some time now we have had a problem we cannot fix. Even this article didn't help to fix it. Do you want to earn money with bug fixing? More details at our bounty bug site.
We have an ATL based ActiveX control that uses OpenGL for rendering. This control seems to crash on random computers. It seems that on computers where this crash occurs an invalid pixel format is chosen.
More information can be found here.
Greetings,
The Eximion Team
|
|
|
|
 |
|
 |
When I execute the sample activeX control in Visual Studio 2005 it crashes in ActiveX Control Test Container and Internet Explorer.
Here is the point where it crashes:
if(!wglMakeCurrent(hdc, m_hRC))
{
ATLASSERT(FALSE);
MessageBox(_T("Failed creating window: Can't activate the OpenGL Rendering Context."), _T("SHUTDOWN ERROR"), MB_OK | MB_ICONINFORMATION);
int b = 0;
int a = 1/b;
}
The function wglMakeCurrent returns NULL meaning something went wrong.
Even if I use only wglMakeCurrent(hdc, m_hRC) the activeX still crashes in Internet Explorer.
What to do now?
|
|
|
|
 |
|
 |
Hi,
I think it would be useful to call GetLastError() to find out exactly what is going wrong.
Dmitri
|
|
|
|
 |
|
 |
i've got a similar trouble with active-x and IE7... wglMakeCurrent() returns NULL due to some trouble but unfortunately GetLastError() returns S_OK... can you give me any idea about fix it?
thanks
|
|
|
|
 |
|
 |
This article and the accompanying code were written in the times of Visual Studio 6. I imagine that, since then, Microsoft has gone easy on the support of wgl-prefixed functions. Indeed, the fact that there is an (unclaimed) bounty of EUR500 on the problem you're describing, I think the problem is pretty much unresolvable.
Sorry I cannot be of more help.
|
|
|
|
 |
|
 |
I had a similar problem with a control I have created.
This problem occurs because the client of the control (power point, visual basic or IE) calls OnDraw() before calling OnCreate().
To avoid problems, it may be a good idea to add a check of m_hRC in OnDraw. mhRC will be not null if OnCreate() was executed before.
if (m_hRC!=NULL)
{
wglMakeCurrent(hdc, m_hRC)
}
Handling the hdc for a opengl control has bee a bit confusing to me.
It is possible that HDC hdc = di.hdcDraw; (in OnDraw()) gives a different hdc than the one you get using HDC hdc = GetDC(); (OnCreate or OnSize)
In my control I decided to use OnDraw() to draw text on the control and use OnPaint or OnTimer (use SetTimer()) instead to draw on the control.
|
|
|
|
 |
|
 |
there is a popular example of atlopengl_demo that can be downloaded in the page http://www.codeproject.com/atl/atlopengl.asp.
It is a opengl control created in VC, but when I use it in vb ,it can not work, why?
If I want to use it well in VB,how can I do?
thank you very much!
thank you
|
|
|
|
 |
|
 |
I am have a problem trying to setup the ActiveX
control using the ATL wizard, and then adding
the information that is provided on this page.
Can you describe what is needed to go through
the ATL wizard to setup this control.
The problem that I am getting is that nothing
is drawn in the window. I believe that I have
midded a step some where but have not be able
to trace it down. This is why I would like the
step ATL wizard steps before adding any of the
OpenGL support.
Thanks
Robert Oaks
|
|
|
|
 |
|
 |
To describe this, I first need to know which version of Visual Studio you're using.
|
|
|
|
 |
|
 |
I am using VS 6.0, and ATL 4.0 (i think).
|
|
|
|
 |
|
 |
hi there, i just wondered if it was possible to create "transparent" opengl windows - i can't find anything about this anywhere on the web :/
my idea is to have some sort of 3d opengl stuff hovering over my desktop (without having the desktop be just a picture).
is this possible?
thanks, buggy
|
|
|
|
 |
|
 |
I think the easiest way to have live OpenGL content on your desktop is to put a COM control on a webpage and set that webpage as your background.
|
|
|
|
 |
|
 |
I have never done any ATL control, but here are few tips for OpenGL programming.
First, you dont need (and should not) to recrete the context every time you resize the window. There's no point in it, unless it's something that ATL insist you to do.
What propably is going there is that you lose your device context, when you resize. That is, you should create the window so the window class has the OWN_DC flag. That way the DC wont change. Even if your window never changes you should use that flag.
In your resize methos it's sufficient to just call the glViewport with the new window size as parameters (and also you may want to calculate the new aspect ratio for perspective rendering).
The worst thing recreating the whole GL context on every resize is that you need to also recreate any objects you have done (textures, displaylists), and that wastes time.
|
|
|
|
 |
|
 |
I think you should have m_bWindowOnly = true
|
|
|
|
 |
|
|
 |