|
Post by rosy on Apr 6, 2021 2:23:28 GMT -6
There is a full screen scaling feature. It would be handy to scale to any window. So it is possible to provide a window parameter that specifies its virtual dimensions. For example, we have a window with dimensions of 800x600 and we give its virtual dimensions 600x400, we operate as if it had a size of 600x400, and objects are drawn in the entire window, as in fullscreen mode. I hope we understand each other ...
Or, you might have the option of clicking maximize a window to automatically go to fullscreen.
Why the WindowEvent_Maximize function when this button is inactive? Can you activate it? Is this value TRUE until another UPDATE is called?
I understand that resizing and scrolling the window with the mouse is also not supported ...
What is MouseFocus and InputFocus? Can you set it?
Displacement of the window causes various undesirable graphic "effects", eg it leaves traces. Window minimization does not always work ... Do you have to handle it yourself?
Have you found the cause of a program slowing down in a high-resolution window in Windows? E.g. at 1280x1024.
|
|
|
Post by n00b on Apr 6, 2021 7:58:01 GMT -6
There is a full screen scaling feature. It would be handy to scale to any window. So it is possible to provide a window parameter that specifies its virtual dimensions. For example, we have a window with dimensions of 800x600 and we give its virtual dimensions 600x400, we operate as if it had a size of 600x400, and objects are drawn in the entire window, as in fullscreen mode. I hope we understand each other ... This is possible to do now but requires you to implement the scaling yourself. I will look into adding a built-in function for this in a future release. Or, you might have the option of clicking maximize a window to automatically go to fullscreen. Why the WindowEvent_Maximize function when this button is inactive? Can you activate it? Is this value TRUE until another UPDATE is called? I disabled it a few years ago because of some bug in SDL at the time that would cause resizable windows to break. I will try to get that maximize to work in the next release. I understand that resizing and scrolling the window with the mouse is also not supported ... You can read the mouse wheel along with any other button on the mouse. What you choose to do with that input is left completely up to you. What is MouseFocus and InputFocus? Can you set it? MouseFocus is the window recieving mouse events. Input focus would be the window recieving keyboard events. The only one you need to concern yourself with is the MouseFocus. It really doesn't matter what the input focus is for most programs. Currently you can't set this yourself but I may add this in a future release as well. Displacement of the window causes various undesirable graphic "effects", eg it leaves traces. Window minimization does not always work ... Do you have to handle it yourself? You should probably handle window minimization yourself to have some consistency across different systems. If you leave it up to the OS it would be impossible to predict what would happen on different computers. Have you found the cause of a program slowing down in a high-resolution window in Windows? E.g. at 1280x1024. It depends on how you are trying to draw to your window. At high resolutions you should really only be using images and not using any primitives at all. Even at low resolutions I would still recommend using images and only using primitives when absolutely necessary.
|
|
|
Post by rosy on Apr 6, 2021 11:11:02 GMT -6
This is possible to do now but requires you to implement the scaling yourself. I will look into adding a built-in function for this in a future release. I mean, how alone ...? I disabled it a few years ago because of some bug in SDL at the time that would cause resizable windows to break. I will try to get that maximize to work in the next release. But the windows in RCBasic do not have sliders ... So how should I scroll the window? MouseFocus is the window recieving mouse events. Input focus would be the window recieving keyboard events. The only one you need to concern yourself with is the MouseFocus. It really doesn't matter what the input focus is for most programs. Currently you can't set this yourself but I may add this in a future release as well. I don't quite understand it ... You should probably handle window minimization yourself to have some consistency across different systems. If you leave it up to the OS it would be impossible to predict what would happen on different computers. I have WIndows 7, it's probably nothing exotic. The first window is minimized, the second is not. And when you move it becomes distorted and leaves traces on the screen. I understand, but maybe it's also a mistake. Because with higher horizontal resolution it is OK. Although I did not check on the same computer ...
|
|
|
Post by aurel on Apr 6, 2021 11:31:00 GMT -6
|
|
|
Post by n00b on Apr 6, 2021 13:30:00 GMT -6
rosy For implementing virtual resolutions look at the draw() function in the low-res Maze3D example which is located in (examples\gfx\3D Maze\3D Maze\Maze3D.bas) I draw the screen at a lower resolution and then scale it up to 640 x 480. On the issue of sliders, RCBasic just opens a graphics window. You need to draw your gui elements like sliders yourself. If you want a gui library, I uploaded the library I made which you can find out more about on this post rcbasic.freeforums.net/thread/494/gui. This library is written in RCBasic so all buttons, text fields, etc. are drawn using rcbasic graphic commands. If you want to use a mouse wheel for scrolling you need to read the value from the mouse wheel. Just do something like this: If MouseWheelY > 0 Then 'Scroll Up ElseIf MouseWheelY < 0 Then 'Scroll Down End If
I don't know whats causing your window distortion issue. I just ran a few multi window test on my computer and it ran just fine. I would recommend updating your graphics drivers and see it that helps. The same issue with your window distortion might be causing your issue with your window resolution. I can investigate it but without being able to recreate the issue myself it will take sometime to find the specific cause. aurel SDL can do blits and stretches natively and that is how RCBasic's DrawImage_Blit and DrawImage_Blit_Ex functions work. The method I describe earlier in this post can be used for scaling a virtual resolution. It is why I provided 2 examples for the 3D Maze demo. To show how scaling a lower resolution can help you achieve a higher FPS.
|
|
|
Post by aurel on Apr 6, 2021 15:01:05 GMT -6
then good i was thinking that is not possible in SDL
|
|
|
Post by rosy on Apr 7, 2021 2:56:23 GMT -6
rosy For implementing virtual resolutions look at the draw() function in the low-res Maze3D example which is located in (examples\gfx\3D Maze\3D Maze\Maze3D.bas) I draw the screen at a lower resolution and then scale it up to 640 x 480. In this way ? CanvasClip(f, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, 1) DrawImage_Blit_Ex(f, 0, 0, 640, 480, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT) ? And so it scales in fulscreen? I have another idea ... I can switch to the typical Euclidean coordinate system. At the moment, the Y axis is inverted, which causes many problems, e.g. when using trigonometric functions.
|
|
|
Post by n00b on Apr 7, 2021 5:36:07 GMT -6
The DrawImage_Blit_Ex can be used to redraw images at a specific size.
The trigonometry functions are returning ratios of the sides. It shouldn't be coordinate specific.
|
|
|
Post by rosy on Apr 7, 2021 8:38:51 GMT -6
If there were no problems, I wouldn't be producing here ...
Added to this is the problem of degrees / radians in images, the angle counted from the vertical axis, when in mathematics it is counted from the horizontal ...
|
|
|
Post by rosy on Apr 16, 2021 7:09:19 GMT -6
You could also add functions like MouseScaling, Touch Scaling, which set the scale factor, where specifying a value of 1 would disable scaling.
How to set the sensitivity of the mouse in RCBasic, or other system functions?
|
|
|
Post by n00b on Apr 19, 2021 21:23:04 GMT -6
How to set the sensitivity of the mouse in RCBasic, or other system functions? RCBasic reports exact positions of the mouse. You can set the sensitivity in your app by multiplying the distance the mouse travels by a scaling factor.
|
|
|
Post by rosy on Apr 20, 2021 9:37:52 GMT -6
But how do I know how sensitive the player is and what mouse sensitivity is set in the system?
|
|
|
Post by rosy on May 4, 2021 4:10:39 GMT -6
And it wouldn't do me any good, because the mouse pointer would move differently. Besides, RCBasic limits the reading of the mouse position only to the size of the window, unfortunately.
|
|