Patrik Posted July 3, 2011 Share Posted July 3, 2011 Hello I was wondering if it's possible using the built in text function to somehow only render part of the text on the y-axis. (see picture) How would you achieve this result? Scale it? Render all text and erase the parts no wanted? Quote Link to comment Share on other sites More sharing options...
Canardia Posted July 3, 2011 Share Posted July 3, 2011 Make a small buffer and render it to it. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Patrik Posted July 3, 2011 Author Share Posted July 3, 2011 Make a small buffer and render it to it. Ok, thanks for the tip. I also found another way to do it also using the glScissor(x, y, width, height) command. glScissor command Then you can specify an area on the screen and stuff rendered outside that area will not be shown. Quote Link to comment Share on other sites More sharing options...
Blitzbat Posted August 3, 2011 Share Posted August 3, 2011 Ok, thanks for the tip. I also found another way to do it also using the glScissor(x, y, width, height) command. glScissor command Then you can specify an area on the screen and stuff rendered outside that area will not be shown. Do you have an example for using glScissor? I just can't get it working together with the coordinate system ... Thanks! Quote Link to comment Share on other sites More sharing options...
Patrik Posted August 5, 2011 Author Share Posted August 5, 2011 I don't have access to my computer with the code at the moment. The problem may be that glScissors uses the bottom of the screen as it's 0 coordinate on the Y-axis and the drawing commands uses the top of the screen as 0 on Y-axis. You can check if this is the case by by setting the glScissor to something like glScissor(10, 50, 20, 20 ) and then draw one rectangle that covers the whole screen. Then it should only render a 20x20 sized cube on the left side either at the top or bottom. If it gets rendered at the bottom this is the case. Then you need to offset the glScissor(x, y, width, height) command's y parameter with the height of the screen resolution to get the wanted position. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.