Discussion:
OBNC XYplane
(too old to reply)
d***@gmail.com
2017-11-24 00:07:36 UTC
Permalink
OBNC 0.9.1

I was trying the XYplane module, and getting no output and no errors.

The problem is that OBNC is using double buffering in SDL 1.2 and a call to SDL_Flip(screen) is needed.

The call to Key does this, but seems non intuitive since the purpose of Key is to see if a keyboard key is pressed. After calling Key, the output appeared.

OBNC needs a new procedure in XYplane, such as Show or Flip to display the buffer.
d***@gmail.com
2017-11-24 03:40:09 UTC
Permalink
Post by d***@gmail.com
OBNC 0.9.1
I was trying the XYplane module, and getting no output and no errors.
The problem is that OBNC is using double buffering in SDL 1.2 and a call to SDL_Flip(screen) is needed.
The call to Key does this, but seems non intuitive since the purpose of Key is to see if a keyboard key is pressed. After calling Key, the output appeared.
OBNC needs a new procedure in XYplane, such as Show or Flip to display the buffer.
As a minimum you need to add something like the following to the XYplane documentation (taken from the Oxford Oberon Compiler site):

The procedure Key allows simple keyboard interaction. It also handles the
events generated by X when the graphics window is uncovered, so as to fill
in the newly-exposed region; this means that a graphics application should
call Key in each iteration of its main loop.
miasap
2017-11-24 09:40:29 UTC
Permalink
Post by d***@gmail.com
The procedure Key allows simple keyboard interaction. It also handles the
events generated by X when the graphics window is uncovered, so as to fill
in the newly-exposed region; this means that a graphics application should
call Key in each iteration of its main loop.
Thanks for the suggestion. I will improve the documentation of XYplane.


-- Karl
miasap
2017-12-08 11:53:18 UTC
Permalink
Post by miasap
Post by d***@gmail.com
As a minimum you need to add something like the following to the
The procedure Key allows simple keyboard interaction. It also handles the
events generated by X when the graphics window is uncovered, so as to fill
in the newly-exposed region; this means that a graphics application should
call Key in each iteration of its main loop.
Thanks for the suggestion. I will improve the documentation of XYplane.
The documentation of XYplane has been updated. OBNC 0.10.1 also supports
full screen mode.

http://miasap.se/obnc/obncdoc/obnc/XYplane.def.html


Regards,
Karl

miasap
2017-11-24 09:36:18 UTC
Permalink
Post by d***@gmail.com
OBNC 0.9.1
I was trying the XYplane module, and getting no output and no errors.
The problem is that OBNC is using double buffering in SDL 1.2 and a call to SDL_Flip(screen) is needed.
Double buffering is used to enable smooth animations.
Post by d***@gmail.com
The call to Key does this, but seems non intuitive since the purpose of Key is to see if a keyboard key is pressed.
I agree. However, if I'm not mistaken, this is how Key is usually
implemented.
Post by d***@gmail.com
OBNC needs a new procedure in XYplane, such as Show or Flip to display the buffer.
All basic library modules strictly follows the Oakwood guidelines. If I
change the API the compatibility will be lost.


-- Karl
Loading...