3D Texture with MFC CView

Is the use of glTexImage3D different if I want to use it in an object-oriented MDI with CView::OnDrawGL() function?
I have a generic code for a console application with a 3D cube for windows. When I paste the code into a working MDI interface with CGLEnabledView class, it does not draw anything, just opens a blank window.

I don’t know of a glTexImage3D command in OpenGL (maybe you made a typo), but I use glTexImage2D in a CView-derived window class (although it is an SDI application rather than MDI) without any problems (texture mapping a mercator projection of the Earth onto a rotating sphere).

However, never having done this in a console application, I couldn’t tell you if the behavior is different between console apps and MDI. If you are writing OpenGL in an MFC environment, I recommend “3-D graphics Programming with OpenGL” by Clayton Walnum. Que Publishing, 1995. It’s a little dated, but it has a good discussion of how to do images and texture mapping in an MFC environment in Chapter 9 of the book.

I hope this helps…

Originally posted by artem l. ponomarev:
Is the use of glTexImage3D different if I want to use it in an object-oriented MDI with CView::OnDrawGL() function?
I have a generic code for a console application with a 3D cube for windows. When I paste the code into a working MDI interface with CGLEnabledView class, it does not draw anything, just opens a blank window.