C-KIT-GUI-GTK 0.62
tst_gui_gl2.c File Reference

handle OpenGL-callbacks for tst_gui2.c More...

#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
#include "../ut/ut_umem.h"
#include "../ut/ckit_ut.h"
#include "../gui/gui__.h"
#include "tst_gui_gl2.h"
#include "tst_geo.h"
#include "trackball.h"

Functions

void gl_init_trackball (int mode)
 
void gl_init__ (void)
 
int gl_move (MemObj *mo, void **data)
 
int gl_button (MemObj *mo, void **data)
 
int gl_key (MemObj *mo, void **data)
 
int gl_draw (MemObj *mo, void **data)
 

Variables

int gl_stat = 0
 
float beginx
 
float beginy
 
float quat [4]
 
float zoom
 
Pointf cenPt
 
Pointf mdlMax = {30.0, 30.0, 30.0}
 
Pointf mdlMin = {-30.0, -30.0, -30.0}
 
int actBut = 0
 
static int wSizX =200
 
static int wSizY =200
 

Detailed Description

handle OpenGL-callbacks for tst_gui2.c

=====================================================
List_functions_start:
gl_config
List_functions_end:
=====================================================

Function Documentation

void gl_init_trackball ( int  mode)

init trackball

void gl_init__ ( void  )

init OpenGL

int gl_move ( MemObj mo,
void **  data 
)

callback from mouse-move. if mousbuttons down: rotate|zoom|pan.

int gl_button ( MemObj mo,
void **  data 
)

mousebuttons changed: save state.

int gl_key ( MemObj mo,
void **  data 
)

keyboard-event. Key 'B': block input.

int gl_draw ( MemObj mo,
void **  data 
)

Redraw necessary. Redraw whole scene. GUI_DATA_EVENT =*(int*)data[0]=TYP_EventConfig|TYP_EventDraw GUI_DATA_DEVICE=*(int*)data[1]=TYP_DeviceScreen0 GUI_DATA_I1 =*(int*)data[2]=window-width (for event=TYP_EventConfig) GUI_DATA_I2 =*(int*)data[3]=window-height (for event=TYP_EventConfig)

Variable Documentation

int gl_stat = 0
float beginx
float beginy
float quat[4]
float zoom
Pointf cenPt
Pointf mdlMax = {30.0, 30.0, 30.0}
Pointf mdlMin = {-30.0, -30.0, -30.0}
int actBut = 0
int wSizX =200
static
int wSizY =200
static