Rendering only works under certain window sizes?

I developed an ActiveX component that uses OpenGL. It works great but I am seeing strange things on some computers (Video Cards). These issues are listed below. Any ideas or previous experience in making things work more universally would be appreciated.

  1. I export a BMP that is a dump of the rendered image when the user desires. The exported image only seems to work if the window is a certain size. This is not a memory allocation problem because sometimes the larger size works and the smaller doesn’t.

  2. When the window is certain sizes I cannot get the image to render at all (Black screen). Sometimes I have to enlarge the image render it and then shrink it back to its original size to get the image to render or the buffers to swap and display properly.

Any Thoughts?

Window size must be divisible by 4, don’t ask me why. I noticed that when was doing images on-line, example on www.graitler.com
A.Polar

Originally posted by gdev:
[b]

  1. I export a BMP that is a dump of the rendered image when the user desires. The exported image only seems to work if the window is a certain size. This is not a memory allocation problem because sometimes the larger size works and the smaller doesn’t.
  1. When the window is certain sizes I cannot get the image to render at all (Black screen). Sometimes I have to enlarge the image render it and then shrink it back to its original size to get the image to render or the buffers to swap and display properly.

Any Thoughts?[/b]

  1. Are you sure you are not saving a 24bpp BMP without padding each scanline? Each scanline of a BMP has to be padded to LONG boundaries .

  2. Never had that problem. I’ve coded multiple OpenGL applications and I’ve always been able to resize the windows at will to any size I see fit. Does it happen with all your drivers? all graphics cards? even with MS software implementation?
    Anyway that sounds like a wglMakeCurrent problem to me, do you register the window class with the CS_OWNDC classstyle? Do you call wglMakeCurrent at WM_PAINT time? Are you using a windowless ActiveX control?

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