Xref: news2.mv.net comp.os.msdos.djgpp:5198 From: richard725 AT denver DOT email DOT com (Richard Adams) Newsgroups: comp.os.msdos.djgpp Subject: Two really stupid questions re: graphics. Date: Thu, 20 Jun 1996 11:36:14 GMT Organization: Netcom Lines: 38 Message-ID: <4qb9kg$i7b@sjx-ixn6.ix.netcom.com> NNTP-Posting-Host: den-co12-09.ix.netcom.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I'm brand new to djgpp, and still a beginner in C, so I have two questions I'd like to ask--I apologize if they're faqs. Yes, I have read the FAQ. And no, I didn't understand it. Ok. I am writing a raytracer similar to POV-Ray except mine can do some things POV can't. I have the source code for POV-Ray 2.2, but apparently, it was written for djgpp v1.0 and doesn't work under the version of djgpp I have, v2.0. It generates general protection faults when writing to the video display. Since the graphics code in POV-Ray is rather labyrinthine, I want to write my own graphics routine, both to get my raytracer working, and as an excercise in learning more about C and djgpp. I've looked at the code for GRX2.0 and Allegro, but both are gross overkill for what I need, and I can't figure those programs out either. All I need is a routine to set up a graphics display, and a routine to plot a pixel. So here are my two questions: 1) Does anyone know of a SIMPLE way to set up VGA mode 13h, and how to set up a VESA 1.2 truecolor video mode? (and of course how to get back to text). I know how to do this in Forth and assembly language in real mode, but djgpp and it's protected mode has me stumped (wonderful as protected mode is...:). 2) Does anyone know of a simple way to plot a pixel in the VESA 1.2 and VGA's mode 13h? Again, I could do this in assembly language and forth in real mode, but not in djgpp/protected mode. I know that for Vesa modes there's stuff like bank switching involved. Again, I apologize if these are really easy questions. After being expert in Forth and Assembly language programming in real mode for so long, being a raw beginner in C, djgpp, and protected mode programming, is a rather discomforting feeling...:) Thank you all very much! :) --Richard richard725 AT denver DOT email DOT net