Monday, August 18, 2008

Starting The Game Programming -Part2

Hi gamers,
Lets continue from where we left..we will be concentrating mainly on opengl way of
programming for now...

opengl function naming convention :

glcolor3f implies :-

gl =library name , color = root command , 3 = number of arguments ,
f = argument type.

OpenGL has not a single function or command relating to window or screen management

AUX = Platform I/O, the Easy Way


Before drawing anything we specify :-
Type of window = eg buffered window = means all drawing commands are performed on
the window displayed.

eg:double buffered = it is used in animation...where drawing command are actually
executed to create a scene off screen , then quickly swapped into view on the window.


glInitWindow( " " ) , glinitdisplaymode ( GL_SINGLE | GL_RGBA )

glinitposition( x, y , width ,height )


CALLBACK = we’re going to tell the AUX library to call this function whenever the window needs updating.

glFlush = the glFlush() function simply tells OpenGL that it
should proceed with the drawing instructions supplied thus far before waiting for any more drawing commands.OpenGL commands and statements often are queued up until the OpenGL server processes several “requests” at once. This improves performance, especially when constructing complex objects. Drawing is accelerated because the slower graphics hardware is accessed less often for a given set of drawing instructions.


glMainLoop( FunctionName )
FunctioName = Its the function that is used for drawing.....
function simply keeps the program going until it’s terminated by closing the window. This function’s single argument is a pointer to another function it should call whenever the window needs updating.This callback function will be called when the window is first displayed, when the window is moved or resized, and when the window is uncovered by some other window.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home