flat assembler
Message board for the users of flat assembler.
Index
> Windows > Picture in window from memory address |
Author |
|
Fastestcodes 04 Jul 2022, 06:50
Which is the fastest way?
|
|||
04 Jul 2022, 06:50 |
|
macomics 05 Jul 2022, 14:50
Why 10 ms? 25 fps = 40 ms
|
|||
05 Jul 2022, 14:50 |
|
Fastestcodes 05 Jul 2022, 18:56
0ms-5000ms
|
|||
05 Jul 2022, 18:56 |
|
revolution 05 Jul 2022, 19:11
Fastestcodes wrote: Which is the fastest way? Fastestcodes wrote: wait 10ms Maybe this? Code: mov rcx,10ms loop $ ; is this the fastest possible wait? Code: mov rcx,10ms @@: dec rcx jnz @b ; is this the fastest possible wait? Code: mov rcx,10ms @@: sub rcx,1 jnz @b ; is this the fastest possible wait? Code: invoke Sleep,10ms ; is this the fastest possible wait? But why must it be "fast"? You have a 10ms delay anyway. And the monitor probably doesn't show much more than 100 frames/second. So all the time in between the CPU is just twiddling its thumbs. Last edited by revolution on 05 Jul 2022, 20:27; edited 1 time in total |
|||
05 Jul 2022, 19:11 |
|
Roman 05 Jul 2022, 19:29
Quote: use the GPU Direct2D to draw many sprites or images. Or Directx 10\11 or OpenGL |
|||
05 Jul 2022, 19:29 |
|
Fastestcodes 06 Jul 2022, 09:17
"You can do that "instantly" by simply changing the pointer to the source image."
How can I this eactly? Show me(and every people) example,pls. Fast load,10ms wait: you see pictures. Slow load, 0ms wait: you see half loaded part pictures, stroboscope monitor. |
|||
06 Jul 2022, 09:17 |
|
Overclick 06 Jul 2022, 09:47
For simple window setup child-window with required class, then update pointer. Or create few child-windows and switch visibility attributes.
Setup timer by SetTimer and do your changes by its events. |
|||
06 Jul 2022, 09:47 |
|
revolution 06 Jul 2022, 10:43
Fastestcodes wrote: "You can do that "instantly" by simply changing the pointer to the source image." If you really need to wait 10ms, then simply preload all the images into the GPU buffer and flip them "instantly" using the GPU resources to do the work. But you can also display one image and prepare a new image in a hidden buffer, so there is no preload, then a half finished image is not on display. Once prepared then wait for a variable amount time until the next 10ms period. Using any of those GPU libraries you can also synchronise the output with the vertical retrace and there is no image tearing, regardless of how long it takes to prepare eac image. Although I would add SDL to the list of potential libraries that Roman showed. |
|||
06 Jul 2022, 10:43 |
|
Fastestcodes 06 Jul 2022, 11:41
I need sample code. (like Masm32 example codes, or similar)
|
|||
06 Jul 2022, 11:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.