D3D glScissor bug in Release version of opengl2d3d
by Vitaliy · in Torque Game Builder · 01/24/2013 (12:01 am) · 7 replies
In the function static void QuakeUpdateViewport () in opengl2d3d.cc I came across a comment / / BUGBUG: if the viewport overlaps the scissor rect, then none of this Works. Is it possible to fix that Bug? If i use glScissor in the release version of opengl2d3d.dll, i have the viewport bug.
#2
01/28/2013 (5:07 am)
In the hidden object game i use glScissor in the window. Window has some animated object with rotation. Window appear with scaling. Game location and window has the same scenegraph. Above that window i have some inventory items and menu. Inventory items and window objects must be clipped.
#3
If you're using sprite objects for these elements, well, oddly enough they also support transparency....
Maybe I'm missing something - can you post a screenshot or something to illustrate what you're talking about. It really sounds like you're trying to do something that you don't actually have to do.
01/28/2013 (6:37 am)
Inventory and menu GUI objects support transparency - so if they're over something you can see through them....If you're using sprite objects for these elements, well, oddly enough they also support transparency....
Maybe I'm missing something - can you post a screenshot or something to illustrate what you're talking about. It really sounds like you're trying to do something that you don't actually have to do.
#4
I remember that there once was a post or resource for ignoring objects if they were clicked on a transparent region (much like using a collision polygon), but I wasn't able to find it.
01/28/2013 (12:50 pm)
I may be misunderstanding, but there is this code (www.garagegames.com/community/forums/viewthread/81610) that can return you the color value at a pixel. (It may have limitations... check the whole thread.) You can then see if the pixel was transparent (or mostly transparent) to see if you should try to process the next object.I remember that there once was a post or resource for ignoring objects if they were clicked on a transparent region (much like using a collision polygon), but I wasn't able to find it.
#5
01/28/2013 (6:09 pm)
Ah hah - yes, there was a resource on it once upon a time for filtering mouse events using the GUI object's image transparency.
#7
Put your border in the background as a GuiBitmapCtrl. Then place your t2dSceneWindow within the GuiBitmapCtrl. Something like:
When you put your scene into sceneWindow2D, it'll look clipped by the frame.
01/29/2013 (12:33 am)
This can be accomplished much more simply (I think).Put your border in the background as a GuiBitmapCtrl. Then place your t2dSceneWindow within the GuiBitmapCtrl. Something like:
new GuiControl(mainScreenGui) {
new GuiBitmapCtrl(Frame) {
position = "0 0";
extent = "800 600";
bitmap = "YourFrame.jpg";
...
};
new t2dSceneWindow(sceneWindow2D) {
position = "25 25";
extent = "750 550";
...
};
}When you put your scene into sceneWindow2D, it'll look clipped by the frame.


Associate William Lee Sims
Machine Code Games