Hi,
I’m porting some Mac code to Windows, and in the Mac version the gl context only covered a certain part of the window.
This was achieved by clipping the gl buffer as follows:
Originally posted by ian:
[b]Hi,
I’m porting some Mac code to Windows, and in the Mac version the gl context only covered a certain part of the window.
This was achieved by clipping the gl buffer as follows:
I cannot for the life of me find any Windows equivalents of these Mac specific agl calls.
Does anyone have any advice on how to clip the gl buffer to a specified region in the window?
TIA
Ian[/b]
I’m not familiar with the AGL functions, but from what I understand, you could achieve the same functionality using OpenGL scissoring :?
Although that won’t work if you want to scissor SwapBuffers (scissor doesn’t affect swapbuffers, you could use WIN_SWAP_HINT, but that’s just a hint and it may be disregarded by the driver).
I believe that the best solution is to use a child window as OpenGL window and change the size so it matches your desired buffer size.
Originally posted by evanGLizr:
[b]I’m not familiar with the AGL functions, but from what I understand, you could achieve the same functionality using OpenGL scissoring :?
Although that won’t work if you want to scissor SwapBuffers (scissor doesn’t affect swapbuffers, you could use WIN_SWAP_HINT, but that’s just a hint and it may be disregarded by the driver).
I believe that the best solution is to use a child window as OpenGL window and change the size so it matches your desired buffer size.[/b]
Unfortunately I do need a double buffered context.
I’m not familiar with child windows, at first I hoped they could be ‘attached’ to the parent window and would automagically be moved around when the parent window is moved/resized.
I couldn’t find anything like this in the MSDN docs though?
I’ve noticed a post on Overlays which look like an area to investigate further