correct reply to address

Search this archive.

From: ivan@vianet.net.au
Date: Sun 04 Apr 1999 - 09:45:41 IDT


SORRY - correct reply address is ivan@vianet.net.au (mail to root will be
received by my presumably upset ISP system admin. ).

Ivan.


On Sun, Apr 04, 1999 at 02:04:37PM +0800, root wrote:
> Although I haven't resolved the other issue regarding freeing an allocated
> physical context I am proceeding anyway & ignoring that issue for the
> moment.
> 
> I have run into a problem in that I can't get my virtual screen to display
> on the physical - this makes it rather difficult to see what's going on :)
> 
> TIA of your assistance.
> Ivan.
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <vgagl.h>
> #include <vga.h>
> 
> main()
> {
> 	GraphicsContext *virtualscreen;
> 	GraphicsContext *physicalscreen;
> 
> 	vga_init();
> 
> /*** create virtual screen ***/
> 	gl_setcontextvgavirtual(35);  /* G800x600x16M32 */
> 	virtualscreen=gl_allocatecontext();
> 	gl_getcontext(virtualscreen);
> 
> /*** create physical screen ***/
> 	vga_setmode(35);
> 	physicalscreen=gl_allocatecontext();
> 	gl_getcontext(physicalscreen);
> 
> 	gl_setcontext(virtualscreen);
> 
> 	/* draw something here using gl_setpixelrgb() */
> 
> 	gl_copyscreen(physicalscreen);
> 	/*** the documentation appears to be wrong here in that */
> 	/*** gl_copyscreen(&physicalscreen) is suggested yet this */
> 	/*** causes a compilation error for me */
> 
> 	while(getchar() != 'x');
> 	/*** at this stage, I should have something visible and be */
> 	/*** waiting for an 'x' input to terminate the programme   */
> 	/*** but in fact I am left looking at the same blank screen */
> 	/*** that I started with :(  */
> 
> 	vga_setmode(TEXT);
> 	gl_freecontext(virtualscreen);
> /*	gl_freecontext(physicalscreen);*/
> 	/*** the commented out line above causes a segmentation fault */
> 	/*** as discussed in my last post                             */
> 
> 	return (0);
> 
> }
> 


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST