/*   EXTRAITS DE LA LICENCE
	Copyright CEA, contributeurs : Luc BILLARD et Damien
	CALISTE, laboratoire L_Sim, (2001-2005)
  
	Adresse mèl :
	BILLARD, non joignable par mèl ;
	CALISTE, damien P caliste AT cea P fr.

	Ce logiciel est un programme informatique servant à visualiser des
	structures atomiques dans un rendu pseudo-3D. 

	Ce logiciel est régi par la licence CeCILL soumise au droit français et
	respectant les principes de diffusion des logiciels libres. Vous pouvez
	utiliser, modifier et/ou redistribuer ce programme sous les conditions
	de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA 
	sur le site "http://www.cecill.info".

	Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 
	pris connaissance de la licence CeCILL, et que vous en avez accepté les
	termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel).
*/

/*   LICENCE SUM UP
	Copyright CEA, contributors : Luc BILLARD et Damien
	CALISTE, laboratoire L_Sim, (2001-2005)

	E-mail address:
	BILLARD, not reachable any more ;
	CALISTE, damien P caliste AT cea P fr.

	This software is a computer program whose purpose is to visualize atomic
	configurations in 3D.

	This software is governed by the CeCILL  license under French law and
	abiding by the rules of distribution of free software.  You can  use, 
	modify and/ or redistribute the software under the terms of the CeCILL
	license as circulated by CEA, CNRS and INRIA at the following URL
	"http://www.cecill.info". 

	The fact that you are presently reading this means that you have had
	knowledge of the CeCILL license and that you accept its terms. You can
	find a copy of this licence shipped with this software at Documentation/licence.en.txt.
*/
#ifndef OPENGL_H
#define OPENGL_H

#include <GL/gl.h>
#include <GL/glu.h> 

#include <glib.h>

#include "visu_data.h"
#include "openGLFunctions/light.h"
#include "openGLFunctions/view.h"

/***************/
/* Public part */
/***************/

/**
 * setOpenGlMaterial:
 * @material: a 5 elements array with the material properties ;
 * @rgba: a 4 elements array with the color values.
 *
 * This method call glMaterial to create the right shiningness, emission, diffuse...
 */
void setOpenGlMaterial(float* material, float* rgba);


/* Object to deal with quadrics. */
GLUquadricObj *obj;

/**
 * initOpengl:
 *
 * This initialises the drawing window and all the variables used
 * by this module. It must be called once by the main program and should
 * not be used otherwise.
 *
 * Returns: 1 if everything goes right.
 */
int initOpengl();

/* Objects to play with lights. */
LightEnvironnement *currentLights;


/* Draw methods */

/**
 * setAntialias:
 * @value: a boolean to activate or not the lines antialias.
 *
 * To set the antialiasing on lines.
 *
 * Returns: TRUE if the signal OpenGLAskForReDraw should be emitted.
 */
int setAntialias(int value);
/**
 * getAntialias:
 *
 * Get the value of the antialiasing parameter.
 *
 * Returns: wether or not the antialising for lines is activated.
 */
int getAntialias();

/**
 * setImmediateDrawing:
 * @bool: a boolean to set or not the immediateDrawing option.
 *
 * If true all changes are applied only when the refresh button
 * is pushed.
 */
void setImmediateDrawing(int bool);
/**
 * getImmediateDrawing:
 *
 * Get the value of the immediateDrawing option.
 *
 * Returns: the value of the immediateDrawing option.
 */
int getImmediateDrawing();

/* redraw methods */
/**
 * openGL_reDraw:
 * @width: with of the OpenGL area ;
 * @height: with of the OpenGL area ;
 * @data: some user defined data.
 *
 * Basic drawing method : it clears the OpenGL area and call all lists.
 */
void openGL_reDraw(guint width, guint height, gpointer data);
/**
 * openGL_drawToEmpty:
 * @width: with of the OpenGL area ;
 * @height: with of the OpenGL area ;
 * @data: some user defined data.
 *
 * Basic drawing method when no data is loaded: it draws the V_Sim logo.
 */
void openGL_drawToEmpty(guint width, guint height, gpointer data);
/**
 * openGLInit_context:
 *
 * This method is called when an OpenGL surface is created for the first time.
 * It sets basic OpenGL options and calls other OpenGLFunctions used in V_Sim.
 */
void openGLInit_context();


#endif


syntax highlighted by Code2HTML, v. 0.9.1