Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tool for testing SCREEN viewport (Lububtu's bug)
#3
Hi Steve
thanks for replying!

Yeah I must say that the rounding argue is very logical.

So now it stands the issue about 32bit screen made by _NEWIMAGE.
Please give a second look at the second screenshot posted at #1.

you can notice that only the last 3 rows of the 10 rows PRINTed are visible...--> print viewport  has  a part  out of the window

going deeper 
you can see that the box drawn around the window is whole visible in SCREEN legacy mode,  but not in SCREEN _NEWIMAGE (W,H,32) -->graphic viewport has a part out the window

following this path
you can see also that the two diagonals are not whole visible  --> graphic viewport has a part out of the window

and you can see too that the center of the viewport is not at centre of the window --> graphic viewport has a part out of the window.

if you take a look at this screenshot got compiling the code of Petr Detect a point in a triangle you can notice that in Lubuntu you cannot see any output as text of the 1st row cause it is not visible.

[Image: image-2025-11-17-232114908.png]

but if you modify the code from LOCATE 1  to LOCATE 5 , now you'll watch the text output in the upper left corner.

This issue affects also OpenGL graphics.
Please run the demo in Lubuntu, or test your Linux OS to see if it is so also there.

Code: (Select All)
Dim Shared GlInit As Integer
GlInit = 0
Screen 0
Print "please press  in order these keys to go on with the demo..."
Print " q w e. This demo starts after 3 seconds!"
Sleep 3
Screen _NewImage(1000, 800, 32)
Locate 1
Print "SCREEN mode 32 bit: first row" ' you cannot read this
Locate 5
Print "Press q to continue" ' you can read this
Do
Loop Until InKey$ = "q"
GlInit = 1
Do
    ' you see a triangle truncated at the top
Loop Until InKey$ = "w"


Screen 12
Locate 1
Print "SCREEN mode legacy 12: first row"
Do
    ' you see a regular triangle
Loop Until InKey$ = "e"


End

Sub _GL
    If GlInit = 0 Then Exit Sub
    _glViewport 0, 0, _Width(0), _Height(0)
    _glClearColor 0, 0, .1, .5
    _glClear _GL_COLOR_BUFFER_BIT Or _GL_DEPTH_BUFFER_BIT
    _glBegin (_GL_TRIANGLES)
    _glColor3f 1, .5, .5
    _glVertex2f -1, -1 ' left down vertex
    _glColor3f .5, 1, .5
    _glVertex2f 1, -1 ' right down vertex
    _glColor3f .5, .5, 1
    _glVertex2f 0, 1 'middle up vertex
    _glEnd
    _glFlush
End Sub

My question is : is the issue of viewport only in Lubuntu? 
Thanks for your attention.
Reply


Messages In This Thread
RE: Tool for testing SCREEN viewport (Lububtu's bug) - by TempodiBasic - 11-17-2025, 11:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Screen fonts in SCREEN 0 BDS107 14 3,570 07-08-2025, 08:05 PM
Last Post: madscijr
  Pete's Handy Dandy File Compare Tool Pete 0 526 11-12-2024, 02:39 AM
Last Post: Pete
  Pete's handy dandy compare tool... Pete 0 573 10-25-2024, 01:20 AM
Last Post: Pete
  TreeSheets: A fantastic little outlining tool CharlieJV 7 2,386 06-28-2023, 08:11 PM
Last Post: CharlieJV
  FeatherWiki, super-light tool that's handy for all sorts of things. CharlieJV 0 480 03-26-2023, 07:19 PM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: 2 Guest(s)