request_scroll(3alleg4) Allegro manual request_scroll(3alleg4)NAME
request_scroll - Queues a hardware scroll request with triple buffering. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int request_scroll(int x, int y);
DESCRIPTION
This function is used for triple buffering. It requests a hardware scroll to the specified position, but returns immediately rather than
waiting for a retrace. The scroll will then take place during the next vertical retrace, but you can carry on running other code in the
meantime and use the poll_scroll() routine to detect when the flip has actually taken place.
Triple buffering is only possible with certain drivers: you can look at the GFX_CAN_TRIPLE_BUFFER bit in the gfx_capabilities flag to see
if it will work with the current driver.
RETURN VALUE
This function returns zero on success, non-zero otherwise.
SEE ALSO poll_scroll(3alleg4), request_video_bitmap(3alleg4), gfx_capabilities(3alleg4), scroll_screen(3alleg4)Allegro version 4.4.2 request_scroll(3alleg4)
Check Out this Related Man Page
request_video_bitmap(3alleg4) Allegro manual request_video_bitmap(3alleg4)NAME
request_video_bitmap - Triple buffering page flip request. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int request_video_bitmap(BITMAP *bitmap);
DESCRIPTION
This function is used for triple buffering. It requests a page flip to display the specified video bitmap object, but returns immediately
rather than waiting for a retrace. The flip will then take place during the next vertical retrace, but you can carry on running other code
in the meantime and use the poll_scroll() routine to detect when the flip has actually taken place. Triple buffering is only possible on
certain hardware: see the comments about request_scroll(). Example:
int current_page;
BITMAP *video_page[3];
...
/* Create pages for page flipping */
video_page[0] = create_video_bitmap(SCREEN_W, SCREEN_H);
video_page[1] = create_video_bitmap(SCREEN_W, SCREEN_H);
video_page[2] = create_video_bitmap(SCREEN_W, SCREEN_H);
current_page = 0;
...
/* draw the screen and flip pages */
draw_screen(video_page[current_page]);
do {
} while (poll_scroll());
request_video_bitmap(video_page[current_page]);
current_page = (current_page+1)%3;
...
RETURN VALUE
Returns zero on success and non-zero on failure.
SEE ALSO poll_scroll(3alleg4), request_scroll(3alleg4), gfx_capabilities(3alleg4), create_video_bitmap(3alleg4), scroll_screen(3alleg4),
ex3buf(3alleg4), exupdate(3alleg4)Allegro version 4.4.2 request_video_bitmap(3alleg4)
Hi i'm new to c programming and i'm trying to change the address of a pointer/variable but i can't seem to get it right,
I have this
char heap;
char *firstFree = heap;
char *allocMem( int size ) {
void *malloc(size_t sizeofint);
/*allocate space for an array with size... (19 Replies)
I was running some timings in my code to see which of several functions was the best and I've been getting some odd results. Here's the code I'm using:
static double time_loop(int (*foo)(int)) {
clock_t start, end;
int n = 0, i = 0;
start = clock();
for (; i <= MAXN; i++)
if... (6 Replies)
Request region to 0xCf8 always fails on 1386 hardware.
What am I doing wrong here?
int pciport_init(void)
{
int result;
/* Registering device */
result = register_chrdev(pciport_major, "pciport", &pciport_fops);
if (result < 0) { printk("<1>pciport: cannot obtain major... (10 Replies)
Hi all,
I am just wondering is this (below code) valid in programming
int xx = 10110;
int i;
long yy = {1,2,3,4,5,6,7,8,xx};
I compiled this using gcc will all working option successfully without getting any warning or error. I didn't see this kind of code in my past... (7 Replies)
Hi!
I am working on fedora..
trying to execute BSD4.4 client-server program which includes "unp.h" header file...
While executing make command, I got error like,
" expected " , " , " ; ",or ")" in connect_nonb file...ERROR 1 "
I tried to change mode of makefile but I can't get... (4 Replies)
Hi folk,
I have this hardware faunty message, but dont know which hardware is this ? can you guide me ?
--------------- ------------------------------------ -------------- ---------
TIME EVENT-ID MSG-ID SEVERITY
---------------... (9 Replies)
Are there any other useful hardware commands to get information about your hardware? Is there any information that can't be found with these commands?
cat /proc/cpuinfo
cat /proc/meminfo
dmesg
lspci
sudo dmidecode
cpuid | more
lspci -v | grep VGA
sudo lspci -v -s 00:02.0
sudo lspci -vvv... (12 Replies)
Hi,
Can anyone tell me why the below program is crashing? and where exactly it is crashing. What is the corrective measure to be taken to make it work fine?
#include <iostream>
#include <cstring>
using namespace std;
class CString {
char* m_data;
public:
CString() :... (6 Replies)
I have a code in which I am passing string "5368709120" to function strtoull() and it should had returned me number 5368709120 but instead it returns me 1073741824 which is incorrect.
What may be the possible cause of this and how to rectify it?
typedef unsigned long long ULL_Type;... (12 Replies)
Hello Friends,
I would appreciate so much if you could explain how the underscores works at the following code? Sorry if it sounds a bit novice question.
awk -F',' 'NR==FNR{_=1;next}!_{print}' exclude infile
KR,
Eagle (6 Replies)
I have the following code that counts the number
of consecuitive logicals from the first one.
Any way I can simplify this function?
Function count_present &
( &
p1, p2, p3, p4, p5, p6, p7, p8 &
) ... (4 Replies)
Hello,
This is related to the closed post in the forum for the installation of the same software called arachne, but with different error message:
In file included from ueberal/MiniSuperizer.cc:5:0:
./random/GnuRandom.h:54:5: error: ‘_G_uint32_t’ does not name a type
_G_uint32_t u;
^... (11 Replies)
hi all,
trying to get this to work but im struggling abit and wondered if you can help me out
basically i have created a variable
base='basename $dir'
echo "please specify full path to directory you want to be made into a tar"
read -e dir
tar -cf... (7 Replies)
I need some help.
I use variables and conditionals to build with or without specic libraries. I set
USEAL ?= 1 # get value from cmd, defaults to 1
(see comment)
the conditional is:
ifeq ($(USEAL),1)
LIBS = <any libs>
else
LIBS =
endif
Its amazing that this works when invoked... (4 Replies)
through below code i am trying to write a content in a file and then reading the same file
my code is running file but is not getting in proper way
import java.io.*;
class A1
{
public static void main (String agrs)
{
byte b = {'a','e','i','o','u'};
String s = "King Maker";
try
{... (7 Replies)