{"id":4016,"date":"2022-12-20T17:28:42","date_gmt":"2022-12-20T20:28:42","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/display-memory-man7\/"},"modified":"2022-12-20T17:28:42","modified_gmt":"2022-12-20T20:28:42","slug":"display-memory-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/display-memory-man7\/","title":{"rendered":"display-memory (man7)"},"content":{"rendered":"<h1 align=\"center\">display-memory<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#FEATURES\">FEATURES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>display-memory<\/b> : Display on buffer in main memory<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">display-memory: [-input] [-noblank] <br \/> [-layout=<fstride>[[plb<lstride>]|[plan<pstride>,<plstride>]]] <br \/> [-physz=<sizex>,<sizey>[dpi]] [-pixfmt=<format_string>] <br \/> [ [shmid:<sid> ] | [keyfile:<size>:<id>:<fname>] | pointer ]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Emulates a linear framebuffer in main memory. The framebuffer can be a shared memory segment, an area specified by the application, or an area allocated by <b>display-memory<\/b> itself.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\">-input<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">If the -input option is set, an input buffer of <b>INPBUFSIZE<\/b> (default is 8192 bytes) as #define\u2019d in <b>ggi\/display\/memory.h<\/b> is allocated at the start of the requested memory area.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">When running on shared memory, this option enables you to give input (using giiEventSend(3)) to other processes sharing that segment. This technique is demonstrated in cube3d(1) and can be used for things like GGI multiplexers.<\/p>\n<p style=\"margin-left:11%;\">-noblank<\/p>\n<p style=\"margin-left:22%;\">If the -noblank option is set, the framebuffer will not be filled with solid black when the mode of the visual is set. This is useful for preserving data from other sources when using a preallocated area of memory as a framebuffer.<\/p>\n<p style=\"margin-left:11%;\">-physz=<sizex>,<sizey>[dpi]<\/p>\n<p style=\"margin-left:22%;\">This option will provide a physical screen size for applications which wish to remain resolution independent. <i>sizex<\/i>, <i>sizey<\/i> are the x,y size of the screen in millimeters, unless the optional dpi string is affixed, in which case, they represent resolution in dots-per-inch.<\/p>\n<p style=\"margin-left:11%;\">-pixfmt=<format_string><\/p>\n<p style=\"margin-left:22%;\">This option will provide a non-default pixel format explicitly. Currently the accepted format of <i>format_string<\/i> is something like &#8220;r5b5g5p1&#8221;, which would specify a pixel where the low bit of the pixel is unused padding, followed by 5 bits of green, then 5 bits of blue and finally 5 bits of red, with the remaining high bits, if any, being unused pad. A more formal description of this format string will be provided (and more strings accepted) in future LibGGI releases.<\/p>\n<p style=\"margin-left:11%;\">[-layout=<fstride>[[plb<lstride>]|[plan<pstride>,<plstride>]]]<\/p>\n<p style=\"margin-left:22%;\">This option will provide a non-default framebuffer layout explicitly. The <i>fstride<\/i> parameter denotes the number of bytes between frames in the framebuffer, and will default to the size of the virtual screen in bytes if nonpresent or set to 0. Following fstride, the string plb denotes a linear packed-pixel framebuffer, or the string plan instead denotes a planar framebuffer. The packed-pixel framebuffer layout is the default. If the string plb is present, a horizontal stride <i>lstride<\/i> may appear, denoting the number of bytes that elapse between the beginning of one line and the next. This will default to the size of a horizontal line in bytes if nonpresent or set to zero. If the string &#8220;plan&#8221; is present, up to two numbers, comma separated, may appear after the string. The first number, <i>pstride<\/i> denotes the number of bytes which elapse between the beginning of one plane and the next. This will default to the minimum integral number of bytes that may contain one bitplane of the virtual screen if nonpresent or set to zero. The second number, <i>plstride<\/i> denotes the number of bytes that elapse between the beginning of one bitplane-line and the next. This will default to the minimum integral number of bytes which may contain one bitplane-line of the virtual screen if nonpresent or set to zero.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">More strings and format parameters may accepted in future LibGGI releases.<\/p>\n<p style=\"margin-left:11%;\">shmid:<sid><\/p>\n<p style=\"margin-left:22%;\">use existing shared memory ID <i>sid<\/i><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">On win32, <i>sid<\/i> is the HANDLE returned by a call to CreateFileMapping in decimal form.<\/p>\n<p style=\"margin-left:11%;\">keyfile:<size>:<id>:<fname><\/p>\n<p style=\"margin-left:22%;\">create a new shm segment with id ftok(fname,id) of size <i>size<\/i> (preferred method !). See ftok(3).<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">On win32, the newly created shared memory mapping has the object name: ggi-display-memory-shm:<fname>:<ascid>, where all backslashes have been converted to forward slashes in <i>fname<\/i> and <i>ascid<\/i> is the ascii value of <i>id<\/i> in decimal form. If this object does already exist (and is a file mapping) it will be used, so two apps can share memory by using the same keyfile arguments on win32.<\/p>\n<p style=\"margin-left:11%;\">pointer<\/p>\n<p style=\"margin-left:22%;\">use the memory pointed to by <i>argptr<\/i> (only available to applications calling <b>ggiOpen(3)<\/b>).<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>Important:<\/b> If you specify a memory area to use &#8211; be sure it\u2019s big enough as no checks can or will be made that a certain mode fits into it.<\/p>\n<h2>FEATURES <a name=\"FEATURES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"58%\">\n<p style=\"margin-top: 1em\">DirectBuffer support always available.<\/p>\n<\/td>\n<td width=\"25%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"58%\">\n<p>Unaccelerated.<\/p>\n<\/td>\n<td width=\"25%\"> <\/td>\n<\/tr>\n<\/table>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  display-memory : Display on buffer in main memory <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,1103,972],"class_list":["post-4016","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-display-memory","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4016"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4016\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}