What are "OgreGLView callbacks"? Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
jwwalker
Goblin
Posts: 224
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 17
Contact:

What are "OgreGLView callbacks"?

Post by jwwalker »

In the Ogre 2.3 documentation of

Code: Select all

Ogre::Root::createRenderWindow()
, the discussion of the

Code: Select all

externalWindowHandle
parameter says:
OS X Cocoa: OgreGLView address as an integer. You can pass NSView or NSWindow too, but should perform OgreGLView callbacks into the Ogre manually.
But I can't find any documentation of OgreGLView. There are classes OgreGL3PlusView and OgreMetalView, but I don't see anything about callbacks.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: What are "OgreGLView callbacks"?

Post by dark_sylinc »

I have no idea. It comes from Ogre 1.x era.

A ticket from Ogre 1.x on Github talks about it.

I suspect it means you need to provide a pointer as integer to a class created by yourself that implements OgreGL3PlusView (see RenderSystems/GL3Plus/src/windowing/OSX/OgreOSXCocoaView.mm and OgreOSXCocoaWindow.mm)

As far as I can see the main difference from providing a OgreGL3PlusView vs (a regular NSWindow) is that Ogre will call setOgreWindow, so that you can later call things like windowMovedOrResized or swapBuffers.

If you don't pass a OgreGL3PlusView (but rather just a regular NSWindow), at some point you still have to call windowMovedOrResized & swapBuffers when appropiate. I suspect that's what the docs mean by "should perform OgreGLView callbacks into the Ogre manually."
Post Reply