gCAD3D 2.40
ut_GL.c File Reference

the OpenGL functions More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_itmsh.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_TX.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_os.h"
#include "../ut/func_types.h"
#include "../db/ut_DB.h"
#include "../gr/ut_gr.h"
#include "../gr/ut_DL.h"
#include "../gr/ut_GL.h"
#include "../gr/ut_GL_bitmaps.h"
#include "../gr/vf.h"
#include "../xa/xa_msg.h"
#include "../xa/xa_uid.h"
#include "../xa/xa_ed.h"
#include "../xa/xa.h"
#include "../xa/xa_ga.h"
#include "../xa/xa_mem.h"


#define SCALE_MAX   1000000.0
#define SCALE_MIN   0.0000001
#define VAL_HUGE   9999999999.9
#define extern
#define COL_ANZ   15
#define DR_BUF_SIZ   1000000
#define PTNR_MAX   1024
#define DR_BUF_SIZ   1000000


static MemTab (int)
GLuint GL_fix_DL_ind (long *)
int GL_Test ()
int GL_att_pt (int ptTyp)
int GL_att_cv (int cvTyp)
int GL_att_su (int suTyp)
int GL_att_sym (int icol)
int GL_att_OnTop_set (int mode)
int GL_att_OnTop__ ()
int GL_att_OnTopOff ()
int GL_ck_sel_PT (Point *pt1)
int GL_selPt (int *is, int *pSel, Point *spt, int ptNr, Point *pTab, int iNr, int *iTab)
int GL_Tex_End ()
int GL_Tex_ckSiz (int ix, int iy)
int GL_EndList ()
int GL_EndList1 (int mode)
int GL_EndList2 ()
void GL_Reframe2 ()
void GL_Reframe1 ()
void GL_Translate ()
void GL_Transl_VertP (Point *pt1)
int DL_Set_Cen2D ()
int DL_Set_Scl2D ()
int GL_ScalBack (double sc)
int GL_Feedback (GLint *size, GLfloat *feedBuffer, GLint idim)
int GL_backgrnd_1 (int mode)
void GL_Print_Redraw ()
void GL_Redra__ (int mode)
void GL_Redraw ()
void GL_GetGLMat0 (void)
int GL_dump_Mat0 ()
int GL_ptSc_ptUc (Point *pt2, Point *pt3)
int GL_ptUc_ptSc (Point *ptu, Point *pts)
void GL_Uk2Sk (double *sx, double *sy, double *sz, double ux, double uy, double uz)
void GL_Sk2Uk (double *ux, double *uy, double *uz, double sx, double sy, double sz)
int GL_Query_siz (int *siz)
void GL_Init0 ()
void GL_Init1 ()
void GL_Init_View ()
void GL_DefineView (int mode)
void GL_DefineDisp (int mode, int mode1)
int GL_Regen1 ()
int GL_Del_om (int typ, long ind, int iatt)
void GL_Del0 (long ind)
int GL_Del1 (long ind)
void GL_Delete (long ind)
int DL_set__ (long dli)
void GL_last_del ()
void GL_temp_del_1 (long ind)
void GL_temp_del_all ()
long GL_temp_GetInd ()
long GL_GetInd_last_temp ()
long GL_GetInd_temp ()
int GL_RubberBox_do ()
int GL_RubberBox_stop ()
int GL_RubberBox_sel (Point *ptOri, int dx, int dy)
int GL_RubberBox_drw__ (int mode)
int GL_RubberBox_draw (Point *ptOri, int rb_dx, int rb_dy, int mode)
void * GL_Print1 (int *iw, int *ih)
int GL_sel_nr_set (int iNr)
int GL_sel_nr_get ()
int GL_sel_get (int *typ, long *dbi, long *dli, int iNr)
int GL_sel_sel (ObjDB **dla)
int GL_sel_sort ()
int GL_sel_hits (long *ia, GLuint *selBuf, int hits)
int GL_sel_rect (ObjDB **dla, int bx, int by, int bdx, int bdy)
int GL_selTab_realloc ()
int GL_sel_add_DB (ObjDB **dla, long dbi, int typ)
int GL_sel_add__ (long dli)
int GL_sel_add_DL (ObjDB **dla, long dli)
int GL_sel_del_rec (ObjDB **dla, int iDel)
int GL_sel_dump ()
long GL_GetActInd ()
long GL_Get_DLind ()
int GL_GetViewPln (Plane *pln)
int GL_SetViewPln ()
int GL_SetConstrPln ()
int GL_DefColGet (ColRGB *nxtCol)
int GL_DefColSet (ColRGB *nxtCol)
Point GL_GetViewPt (Point *pti)
int GL_GetCurPosSc (int *xpos, int *ypos)
int GL_GetEyeLn (Point *curPos, Vector *eyeVec)
Vector GL_GetEyeX ()
int GL_set_viewPlnPos ()
int GL_GetActSelPos (Point *posUsr, Point *posScr)
Point GL_GetCurPos ()
Point GL_GetViewPos ()
Point GL_GetConstrPos (Point *pt1)
void GL_Do_Idle (int *dx, int *dy, int x, int y)
Point GL_GetCen ()
int GL_GetViewSizU (double *sx, double *sy)
void GL_Do_CenRot (double zval)
int GL_eye_upd (int modPln, int modOri)
void GL_Do_Pan__ (int x, int y)
void GL_Do_Rot__ (int x, int y)
void GL_Do_Scale__ (int x, int y)
int GL_View_get (double view[])
int GL_View_dump ()
int GL_View_set (double *view)
void GL_Set_Scale (double Scale)
void GL_Reshape (int width, int height)
int GL_Set_Cen (Point *Ucen)
int GL_Rescal1 (Point *pb1, Point *pb2, float *fa)
int GL_Rescal0 (Point *pb1, Point *pb2)
int GL_FeedGet (int *fsiz, float **feedBuffer, int idim)
void GL_Rescale (double scl, Point *Ucen)
int GL_fix_DL_base (int mode)
int GL_DrawLn_Ini (long *ind, int attInd)
int GL_Surf_Ini (long *ind, ColRGB *col)
int GL_Tex_Ini (long *ind, TexBas *tb, TexRef *tr)
int GL_view_npt (Point *pta, int ptNr, int att, long dbi)
int GL_view_nsymB (Point *pta, int ptNr, int symCol, int symTyp, long dbi)
int GL_view_ini__ (long dbi, int oTyp, int attInd)
void GL_Draw_Ini (long *ind, int attInd)
int GL_Draw_Ini1 (long *ind, int attInd, int mode)
void GL_DrawPoint (long *ind, int attInd, Point *pt1)
void GL_DrawLine (long *ind, int iAtt, Line *ln1)
void GL_DrawLtab (long *ind, int iAtt, Line *lna, int lNr)
void GL_Disp_npt (Point *pa, int ptNr)
void GL_Disp_ln (Point *p1, Point *p2)
void GL_Disp_ln2 (Point2 *p1, Point2 *p2)
void GL_DrawPoly2D (long *ind, int iAtt, int ianz, Point2 pta[], double zval)
void GL_create_dummy (long *ind)
int GL_DrawCvIpTab (long *ind, int att, int *iba, int ibNr, Point *pTab, int mode)
int GL_Draw_cvp_dir (long *ind, int iAtt, int ianz, Point *pTab)
void GL_DrawPoly (long *ind, int iAtt, int ianz, Point *pTab)
void GL_DrawRSur (long *ind, int attInd, int ptAnz, Point *pa1, Point *pa2)
int GL_orient__ (int dir)
int GL_DrawFace (int ptNr, Point *pta, int ptiNr, short *pti, int side)
int GL_DrawStrip1 (Point *ps, Point *pa1, Point *pa2, int ptAnz)
int GL_DrawStrip2 (Point *pa, Point *pb, int ptNr, int newS)
void GL_DrawFan (Point *pt1, int ptNr, Point *pa1, int typ, int newS)
void GL_Disp_nfac (Point *pTab, Fac3 *fTab, int fNr, ColRGB *col)
int GL_Disp_nifac (int fNr, Fac3 *fa, int *ia, Point *pa, Vec3f *va, int oTyp)
int GL_DrawSur (long *ind, int att, ObjGX *bMsh)
int GL_Disp_sur (ObjGX *bMsh)
int GL_ColSet (ColRGB *col)
int GL_Disp_patch (int gTyp, int ptNr, Point *pa)
int GL_Disp_ipatch (int gTyp, int iNr, int *ia, Point *pa)
int GL_Draw_obj (long *dli, int att, ObjGX *oxi)
int GL_Draw_BMP (long *dli, AText *tx1, long dbi)
void GL_DrawSymB (long *ind, int attInd, int symTyp, Point *pt1)
void GL_DrawSymV (long *ind, int symTyp, int att, Point *pt1, double scale)
void GL_DrawSymV2 (long *ind, int symTyp, int att, Point *pt1, Point *pt2, double scale)
void GL_DrawVec (long *ind, int att, Point *pt1, Vector *vc1)
int GL_Draw_tra (long *dli, int att, TraRot *tra)
int GL_DrawAngA (long *ind, int att, Point *ptc, Vector *vx, Vector *vz, double *ang1)
int GL_Disp_vc (Vector *vc1, Point *pt1, int att)
int GL_Disp_pln__ (double lnS)
int GL_Disp_arrh (Point *p1, Point *p2, Vector *vcn)
int GL_Disp_vSym (int symTyp, Point *pt1, Vector *vc1, double scale, int att)
int GL_Disp_symV (int symTyp, Point *pt1, double az, double ay, double scale)
int GL_Disp_symB (int symTyp, Point *pt1)
int GL_Disp_nsymB (Point *pta, int ptNr, int symTyp)
int GL_Displ_ntri (int triNr, Point *pta)
int GL_Disp_2D_box1 (Point *p1, int sx, int sy, int dx, int dy)
int GL_Disp_ci2 (Point2 *pc, Point2 *p1, double ao)
int GL_Draw_rbez (long *ind, int iAtt, CurvRBez *rb1)
int GL_Disp_rbez (CurvRBez *rb1)
int GL_Disp_cv2z (int pnr, Point2 *pta, double zVal)
int GL_Disp_inpt (int pnr, Point *pta, int *iba, int mode)
int GL_Disp_cv (int pnr, Point *pta)
int GL_DrawSymVX (long *ind, int att, Plane *pln1, int typ, double scale)
int GL_DrawSymVTL (long *ind, int symTyp, int att, Point *pt1, double *uScal)
void GL_DrawSymV3 (long *ind, int symTyp, int att, Point *pt1, Vector *vc1, double scale)
int GL_Tex_Load (TexBas *tbAct, char *fNam)
int GL_DrawTxtsym (long *ind, int typ, Point *pts, Vector *vc1, int att, double scl)
int GL_Draw_Tag (long *dli, AText *tx1, long dbi)
void GL_DrawTxtA (long *ind, int att, Point *P1, char *txt)
void GL_Disp_txtA (Point *P1, char *txt)
int GL_DrawDimrad (long *ind, int att, Dimen *dim1)
int GL_DrawDimdia (long *ind, int att, Dimen *dim1)
int GL_DrawDima (long *ind, int att, Dimen *dim1)
int GL_DrawLdr (long *ind, int att, Dimen *dim1)
int GL_DrawDim3 (long *ind, int att, Dim3 *dim3)
void GL_DrawDimen (long *ind, int att, Dimen *dim1)
int GL_txt__ (int dMod, int bMod, Point *ptx, double txAng, double ay, double az, double scale, char *txt)
int GL_Disp_sq1 (Point *p1, Point *p2)
int GL_txtss ()
int GL_txt_ar2 (int hd, Point2 *ptx, Vector2 *vc)
int GL_txt_ar3 (int hd, Point *ptx, Vector *vcx, Vector *vcy)
int GL_DrawTxtLBG (long *dli, AText *tx1, long dbi)
int GL_DrawTxtLG (long *dli, AText *tx1, long dbi)
void GL_DrawTxtG (long *ind, int att, GText *tx1)
int GL_DrawDitto (long *ind, Point *p1, Point *po, long dlNr, long dlInd)
int GL_DrawDitto1 (long *ind, Point *p1, Point *po, double az1, double ay, double az2, double scl, long dlNr, long dlInd)
void GL_DrawDitto2 (long *ind, Point *p1, double az, char mir, Ditto *di)
int GL_DrawModel (long *ind, int att, ModelRef *mdr, ModelBas *mdb)
int GL_set_bgCol (int mode)
void GL_Clear ()
void GL_Resize (int w, int h)
void GL_InitModelSize (double NewModSiz, int mode)
int GL_InitCol (int ic)
int GL_Col__ (int ic)
void GL_InitPtAtt (int ithick)
int GL_InitNewAtt (int mode, int Ind)
int GL_AttTab_dump__ ()
void GL_InitAFont ()
void GL_InitGFont ()
int GL_InitGF2 (int ind, int ianz, char mode[], Point2 *pta)
void GL_InitSymb ()
int GL_Exit__ ()
int GL_InitInfo ()
void GL_Init__ (int mode, int width, int height)
int GL_alloc__ (long Ind)
int GL_MousePos (Point *pt1)
int GL_Mouse2Pos (Point *pt1, GLdouble mx, GLdouble my)
int GL_SelVert__ (Point *pts)
int GL_SelVert_scan (int size, float *buffer)
int GL_SelVert_aux (int mode, float *ptf)
int GL_GetColorBits ()
double GL_query_ViewZ ()
double GL_get_Scale ()
int GL_GetScrSiz (int *ix, int *iy)
int GL_Tex_Del (int ii)
int GL_test_error ()
int GL_config_test ()
int GL_grid__ (Plane *gPln, Mat_4x3 gMat, Mat_4x3 gImat)
int GL_Disp_txt2D (char *sTxt)
int GL_Disp_tag2D (int iSizX, int iSizY, int ColGL)
int GL_tst1 ()


Att_ln GR_AttLnTab [GR_ATT_TAB_SIZ]
int GA_recNr
int UI_InpMode
char UI_stat_view
char UI_stat_hide
int WC_modact_ind
Plane WC_sur_act
 the active construction-plane More...
double WC_sur_Z
 active Z-value of WC_sur_sur; More...
int WC_sur_ind
 Der Index auf die ActiveConstrPlane. More...
Mat_4x3 WC_sur_mat
Mat_4x3 WC_sur_imat
 inverse TrMat of ActiveConstrPlane More...
int WC_stat_bound
 ON OFF; Draw boundary of Flächen J/N. More...
double AP_txsiz
 Notes-Defaultsize. More...
double AP_txdimsiz
 Dimensions-Text-Defaultsize. More...
double GR_tx_ldExt
double GR_tx_ardx
double GR_tx_ardy
double GR_tx_chw
double GR_tx_chh
int GR_tx_nkNr
long GLT_pta_SIZ
int TSU_mode
int APT_dispSOL
double APT_ModSiz
int IE_modify
static unsigned int * GL_IndTab
long GL_TAB_SIZ = 0
long GL_TAB_INC = 10000
int GL_modified = 0
int GL_rub_stat = 0
static ObjDBGR_selTab = NULL
static long GR_Siz_selTab = 0
static int GR_nr_selTab = 0
static GLfloat GL_light_2si [4] = {0.0f, 0.0f, 0.0f, 1.0f}
static GLfloat GL_mod_amb1 [] = {0.1f, 0.1f, 0.1f, 1.0f}
static GLfloat GL_mat_spc1 [] = {0.5f, 0.5f, 0.5f, 1.0f}
static GLfloat GL_light_amb1 [] = {0.1f, 0.1f, 0.1f, 1.0f}
static GLfloat GL_light_dif1 [] = {0.4f, 0.4f, 0.4f, 1.0f}
static GLfloat GL_light_spc1 [] = {0.5f, 0.5f, 0.5f, 1.0f}
static GLfloat GL_mod_amb2 [] = {0.2f, 0.2f, 0.2f, 1.0f}
static GLfloat GL_mat_spc2 [] = {0.8f, 0.8f, 0.8f, 1.0f}
static GLfloat GL_light_amb2 [] = {0.4f, 0.4f, 0.4f, 1.0f}
static GLfloat GL_light_dif2 [] = {0.8f, 0.8f, 0.8f, 1.0f}
static GLfloat GL_light_spc2 [] = {0.6f, 0.6f, 0.6f, 1.0f}
static GLfloat GL_mat_hili [] = {0.8f, 0.8f, 0.8f, 1.0f}
static GLfloat GL_local_view [] = { 0.0f}
static GLfloat GL_light0_pos [4] = { 0.0f, 400.0f, 400.0f, 1.0f}
static GLfloat GL_light0_spo [4] = { 0.0f, 0.0f, 1.0f, 0.0f}
static GLfloat GLcol_t1 [] = {1.0, 1.0, 0.0, 1.0}
static GLfloat GLcol_black [] = {0.0, 0.0, 0.0, 0.0}
static GLint LtypTab1 [] = { 1, 3, 1, 2}
static GLushort LtypTab2 [] = {0xFFFF, 16377, 0x0FFF, 0x0FFF}
static GLfloat GL_col_tab [COL_ANZ][4]
static GLfloat GL_col_bg [4] = {0.6, 0.6, 0.6, 1.0}
static GLfloat GL_col_be [4] = {0.6, 0.4, 0.4, 1.0}
ColRGB GL_defCol
ColRGB GL_actCol
int GL_actTex
static unsigned char GL_transpTab [4] = { 254, 250, 128, 64}
static int GL_stat_blend = 0
static int GL_stat_OnTop = 0
double GL_Scr_Siz_X
double GL_Scr_Siz_Y
double GL_fakt
double GL_Scale = 1.0
static double GL_Scale_back = 1.0
double GL2D_Scale = 1.0
static double GL_SclNorm
static Plane GL_constr_pln
static Plane GL_view_pln
Point GL_cen = {0., 0., 0.}
static Plane GL_eye_pln
 GLBT_ori = lower right point on GL_eye_pln in userCoords. More...
double GL_angZ
double GL_angX
GLdouble GL_ModSiz = 500.
GLdouble GL_ModScale
static int GL_mouse_x_act = 0
static int GL_mouse_y_act = 0
static Point GL_actScrPos
 curPos in screenCoords More...
static Point GL_actUsrPos
 curPos in userCoords on viewPlane More...
static int GL_Func_Act
 FUNC_Idle|FUNC_Pan|FUNC_RotCen|FUNC_Rot; aus base. More...
GLint GL_Viewp [4]
static GLdouble GL_MatMod [16]
static GLdouble GL_MatProj [16]
static int GL_actView = FUNC_ViewIso
static int GL_initMode = 0
int GL_mode_draw_select = GR_MODE_DRAW
static int GL_mode_feed = 0
static int GL_mode_wire_shade = GR_STATE_WIRE
static GLuint DL_Ind_tmp = 1
static GLuint DL_base__
static int DL_FontOff

Detailed Description

the OpenGL functions

GL_Draw.. open DispList, create openGl-obj, close DispList.
GL_view_ create new dispList-record OR draw into open dispList
GL_Disp_ add openGl-obj into already open DispList
GL_view_npt display n points using GL_POINTS
GL_DrawLtab display group of lines
GL_DrawPoly2D 2D-Polygon on plane Z=zval
// GL_DrawPolySc Scaled Polygon
GL_DrawCvIpTab draw polygon from indexTable; open or closed
GL_DrawPoly polygon
GL_Draw_cvp_dir polygon and direction-arrow
GL_DrawDimen Hor, Vert Dimension
GL_DrawDima Angular Dimension
GL_DrawDimdia Diameter-Dimension
GL_DrawDimrad Radius-Dimension
GL_DrawTxtA text alphanum.(fixed size, horiz)
GL_Draw_Tag Text + Farbiges Rechteck ?
GL_DrawSymV3 oriented vector-symbols; SYM_ARROW SYM_SQUARE
GL_view_nsymB display n points using bitmap-symbols
GL_Draw_tra display symbolic TraRot (rotation)
GL_DrawAngA draw angle with arrowhead
GL_DrawSymVX display plane / axisSystem [with x,y,z-characters
GL_DrawSymVTL display vector-symbol with true length at 2D-ScreenCenter
GL_Draw_obj Draw 1-n Polygons as GL_LINE_STRIPs from ObjGX
GL_Draw_rbez draw rational bezier curve
-------------- init / close GL-List -----------------------------
GL_Draw_Ini Init Flaechen
GL_Draw_Ini1 Init Lines,Curves|Flaechen
GL_DrawLn_Ini Init Lines,Curves
GL_EndList close GL-Ausgaben
GL_EndList1 close GL-Ausgaben
GL_EndList2 close GL-Ausgaben
GL_att_pt set attribute for points see INF_COL_PT
GL_att_cv set lineAttribute see INF_COL_CV
GL_att_su set surfaceAttribute see INF_COL_SYMB
GL_att_sym set symbol-attribute see INF_COL_SYMB
GL_att_OnTop_set set/reset "overwrite-all"
GL_att_OnTop__ set "overwrite-all"
GL_att_OnTopOff reset "overwrite-all"
-------------- draw into open open GL-List -----------------------------
GL_Disp_npt display points (GL_POINTS)
GL_Disp_ln Ausgabe GL_LINES
GL_Disp_ln2 Ausgabe GL_LINES
GL_Disp_ci2 Ausgabe 2D-Circ
GL_Disp_cv Ausgabe Polygon
GL_Disp_cv2z display 2D-polygon with z-value
GL_Disp_inpt disp polygon from indexed points; open or closed.
GL_Disp_rbez draw rational bezier curve
GL_DrawCirSc Ausgabe Circ ..
GL_Disp_pln__ display plane/rectangle
GL_Disp_vSym add vectorsymbols (true length) into open displist
GL_Disp_vc add normalized vector (SYM_ARROW) into open displist
GL_Disp_symV add vectorsymbols eg SYM_ARROH SYM_VEC into open displist
GL_Disp_symB add bitmapsymbol into open displist
GL_Disp_nsymB add bitmapsymbols into open displist
GL_Disp_txtA text alphanum.(fixed size, horiz) position
GL_Disp_txt2D text alphanum.(fixed size, horiz)
GL_Disp_tag2D display coloured rectangle
// GL_DispTag1 display coloured rectangle
// GL_DispTag2 display coloured rectangle
GL_Displ_ntri display triangles from points
GL_Disp_nfac display triangles from Fac3
GL_Disp_nifac display indexed-Opengl-patch (type,indexTable,points)
GL_Disp_patch display Opengl-patch (type & n-points)
GL_Disp_ipatch display indexed-Opengl-patch (type,indexTable,points)
GL_Disp_sur Draw 1-n Planar Patches from ObjGX (binary mesh)
GL_Disp_2D_box1 not-zooming 2D-box
GL_Disp_2D_box2 unused zoomed 2D-fields (DrawPixels)
GL_Disp_sq1 Disp. quadrat. Flaeche
GL_GetCen get center of grWin in userCoords
GL_GetScrSiz get size of graficWindow in screenCoords
GL_GetViewSizU get size of graficWindow in userCoords
GL_MousePos get Mousepos in userCoords
GL_GetEyeLn Sichtstrahl (Point & Vector) retournieren
GL_GetEyeX Sichtstrahl (Vector) retournieren
GL_GetActSelPos get screenCoords & userCoords of selectionPoint
GL_set_viewPlnPos save screenCoords & userCoords of selectionPoint
GL_GetViewPos Curpos in userkoord. retournieren
GL_GetConstrPos Curpos in userkoord. retournieren
GL_GetColorBits returns Nr of ColorBits (usually 24)
GL_ck_sel_PT test if point selected
GL_selPt 2D-test: find actCurPos in pTab
GL_selSubPt 2D-test: find point in pTab
GL_Query_siz Estimate size of all OpenGL-objects for FeedbackBufferSize.
GL_pos_move_2D move 3D-point with 2D-offset
GL2D_pos_move relative move of the screenPos in screencoords INLINE
GL_ptSc_ptUc userCoord -> screenCoord
GL_ptUc_ptSc ScreenCoords -> UserCoords
GL_Uk2Sk userCoord -> screenCoord
GL_Sk2Uk screenCoord -> userCoord
GL_sel_rect returns the ID's of all objs inside rectangle
GL_sel_sel return objs from selection
GL_sel_add_DB add DB-obj into selectionBuffer GR_selTab
GL_sel_add_DL add DL-obj into selectionBuffer GR_selTab
GL_set_bgCol set background-color; 0=OK, else Error.
GL_ColSet activate Color,transparency for surface from ColRGB
------------------ InitFunctions:
GL_InitNewAtt create / change line-attribute in DL
// GL_Init_Siz init clipping planes
GL_GetActInd return dispList-index of last created obj
GL_Get_DLind return nr of used dispList obj's (index of next free)
GL_Del_om del multiple objects from DL
GL_Del0 ein Obj der DL loeschen od gesamte DL loeschen
GL_Del1 ein Obj der Gl-DispList loeschen
GL_Delete DispList zuruecksetzen;
GL_last_del delete last obj of DL, if its DB-index is 0
GL_Regen1 reset GR_TAB_IND (remove unused recs at end)
GL_temp_del_1 eine bestimmte loeschen ..
GL_temp_del_all alle temp. obj loeschen ..
GL_temp_GetInd get index of last created temp-obj
GL_GetInd_temp returns next free temp-obj-ind
GL_GetInd_last_temp return last temp-obj-index.
GL_Tex_Del delete OpenGL-texture
GL_Tex_ckSiz test if texture could be loaded by OpenGL
DL_hili_on hilite obj from dispListIndex
DL_hili_off remove hilite from obj from dispListIndex
------------------ test functions:
GL_tst_pta testen der GL_Disp_pta

Macro Definition Documentation

#define SCALE_MAX   1000000.0
#define SCALE_MIN   0.0000001
#define VAL_HUGE   9999999999.9
#define extern
#define COL_ANZ   15
#define DR_BUF_SIZ   1000000
#define PTNR_MAX   1024
#define DR_BUF_SIZ   1000000

Function Documentation

static MemTab ( int  )
GLuint GL_fix_DL_ind ( long *  ind)
* GL_fix_DL_ind make OpenGL-dispListIndex from dli (add DL_base__)
* Input:
* ind <= -2 fixed temp-Index; > -DL_base_font1; < -1;
* == -1 next free temp-DL-index; > -DL_base_font1; < -1;
* >= 0 normal obj; add DL_base__
* Output:
* ind in >= 0 DL_base__ added ..
* in == -1 returns next free (> 1; < DL_base_font1)
* in <= -2 fixed temp-Index (*= -1)
* RetCod: OpenGL-dispListIndex
int GL_Test ( )
int GL_att_pt ( int  ptTyp)
* GL_att_pt set attribute for points
* ptTyp eg. ATT_PT_GREEN see INF_COL_PT
* close GL-list with GL_EndList1(0)
int GL_att_cv ( int  cvTyp)
* GL_att_cv set lineAttribute
* cvTyp eg Typ_Att_top1 see INF_COL_CV
* close GL-list with GL_EndList1(0)
* see also GL_DrawLn_Ini
int GL_att_su ( int  suTyp)
int GL_att_sym ( int  icol)
* GL_att_sym set symbol-attribute
* icol color of symbols see INF_COL_SYMB
* use before GL_Disp_nsymB ..
* Example: ?
int GL_att_OnTop_set ( int  mode)
* GL_att_OnTop_set set/reset "overwrite-all"
* using glDepthFunc (GL_ALWAYS);
* used by GL_DrawSymB
int GL_att_OnTop__ ( )

GL_att_OnTop__ set "overwrite-all"

int GL_att_OnTopOff ( )

GL_att_OnTopOff reset "overwrite-all"

int GL_ck_sel_PT ( Point pt1)
* compare pt1 with last mouseposition
* Input:
* Output:
* Retcod: 0 point is inside selection-area
* 1 outside; no selection ..
int GL_selPt ( int *  is,
int *  pSel,
Point spt,
int  ptNr,
Point pTab,
int  iNr,
int *  iTab 
int GL_Tex_End ( )
int GL_Tex_ckSiz ( int  ix,
int  iy 
* test if texture could be loaded by OpenGL
* RetCod:
* 0 OK; can load texture, -1 NO; texture too big ..
int GL_EndList ( )
int GL_EndList1 ( int  mode)
* mode = 0 fuer Lines, Curves and surfs .. (ohne glDisable (GL_LIGHTING);)
* mode = 1 fuer Flaechen (schattieren .. = Default);
* (GL_LIGHTING enabled = defaultmode)
int GL_EndList2 ( )
void GL_Reframe2 ( )
void GL_Reframe1 ( )
void GL_Translate ( )
void GL_Transl_VertP ( Point pt1)
int DL_Set_Cen2D ( )
int DL_Set_Scl2D ( )
int GL_ScalBack ( double  sc)
int GL_Feedback ( GLint *  size,
GLfloat *  feedBuffer,
GLint  idim 
* Input:
* idim GL_2D | GL_3D
* Output:
* size nr of floats in feedBuffer
* feedBuffer
int GL_backgrnd_1 ( int  mode)
void GL_Print_Redraw ( )
void GL_Redra__ ( int  mode)
void GL_Redraw ( )
void GL_GetGLMat0 ( void  )
int GL_dump_Mat0 ( )
int GL_ptSc_ptUc ( Point pt2,
Point pt3 

GL_ptSc_ptUc Userkoords > Screenkoords.

int GL_ptUc_ptSc ( Point ptu,
Point pts 

GL_ptUc_ptSc Screenkoords. -> Userkoords

void GL_Uk2Sk ( double *  sx,
double *  sy,
double *  sz,
double  ux,
double  uy,
double  uz 
void GL_Sk2Uk ( double *  ux,
double *  uy,
double *  uz,
double  sx,
double  sy,
double  sz 
int GL_Query_siz ( int *  siz)
void GL_Init0 ( )
void GL_Init1 ( )
void GL_Init_View ( )
void GL_DefineView ( int  mode)
* Change Views Function. Set GL_eyeX, GL_eyeZ.
* GL must be open (UI_GR_DrawInit)
* keep GL_cen, GL_Scale;
* Input:
void GL_DefineDisp ( int  mode,
int  mode1 
int GL_Regen1 ( )
int GL_Del_om ( int  typ,
long  ind,
int  iatt 
void GL_Del0 ( long  ind)
int GL_Del1 ( long  ind)
void GL_Delete ( long  ind)
* reset dispList.
* remove DL-record[ind] and all following records.
int DL_set__ ( long  dli)

delete all records following dli

void GL_last_del ( )
void GL_temp_del_1 ( long  ind)
* delete object in temp-area of DispList
* see also GL_temp_del_all
void GL_temp_del_all ( )

delete ALL objects in temp-area of DispList

long GL_temp_GetInd ( )

GL_temp_GetInd get index of last created temp-obj

long GL_GetInd_last_temp ( )

return last temp-obj-index.

long GL_GetInd_temp ( )

return next free temp-obj-index.

int GL_RubberBox_do ( )
int GL_RubberBox_stop ( )
int GL_RubberBox_sel ( Point ptOri,
int  dx,
int  dy 
int GL_RubberBox_drw__ ( int  mode)
int GL_RubberBox_draw ( Point ptOri,
int  rb_dx,
int  rb_dy,
int  mode 
* 1.call: create box; 2.call deletes box.
* mode 0=createBox 1=removeBox
* 2015-08-31 Does not work for Driver X.Org-X-Server for AMD/ATI
void* GL_Print1 ( int *  iw,
int *  ih 
int GL_sel_nr_set ( int  iNr)
int GL_sel_nr_get ( )
int GL_sel_get ( int *  typ,
long *  dbi,
long *  dli,
int  iNr 
int GL_sel_sel ( ObjDB **  dla)
int GL_sel_sort ( )
int GL_sel_hits ( long *  ia,
GLuint *  selBuf,
int  hits 
int GL_sel_rect ( ObjDB **  dla,
int  bx,
int  by,
int  bdx,
int  bdy 
int GL_selTab_realloc ( )
int GL_sel_add_DB ( ObjDB **  dla,
long  dbi,
int  typ 
int GL_sel_add__ ( long  dli)
int GL_sel_add_DL ( ObjDB **  dla,
long  dli 
int GL_sel_del_rec ( ObjDB **  dla,
int  iDel 
int GL_sel_dump ( )
long GL_GetActInd ( )
long GL_Get_DLind ( )
int GL_GetViewPln ( Plane pln)
int GL_SetViewPln ( )
int GL_SetConstrPln ( )
int GL_DefColGet ( ColRGB nxtCol)
int GL_DefColSet ( ColRGB nxtCol)
Point GL_GetViewPt ( Point pti)
int GL_GetCurPosSc ( int *  xpos,
int *  ypos 
int GL_GetEyeLn ( Point curPos,
Vector eyeVec 
Vector GL_GetEyeX ( )
int GL_set_viewPlnPos ( )
* GL_set_viewPlnPos save screenCoords & userCoords of selectionPoint
* on viewPlane
int GL_GetActSelPos ( Point posUsr,
Point posScr 
* GL_GetActSelPos Coords of last selectionPoint on viewPlane
* posUsr userCoords
* posScr screenCoords
Point GL_GetCurPos ( )

compute cursorPosition in userCoords

Point GL_GetViewPos ( )
* compute cursorPosition in userCoords on GL_view_pln.
* GL_view_pln is the displayPlane; always parallel to X-Y.
Point GL_GetConstrPos ( Point pt1)
* compute intersectionpoint of pt1 along eyeVector on constructionPlane
* eyeVector = GL_eyeX; constructionPlane = GL_constr_pln
* returns: point in worldCoords on constructionPlane
void GL_Do_Idle ( int *  dx,
int *  dy,
int  x,
int  y 
Point GL_GetCen ( )

screencenter in userCoords (returns GL_cen) see also GL_GetViewSizU

int GL_GetViewSizU ( double *  sx,
double *  sy 

return size of graficWindow in userCoords see also GL_GetCen

void GL_Do_CenRot ( double  zval)
int GL_eye_upd ( int  modPln,
int  modOri 
void GL_Do_Pan__ ( int  x,
int  y 
void GL_Do_Rot__ ( int  x,
int  y 
void GL_Do_Scale__ ( int  x,
int  y 

modify scale according to mousemovement

int GL_View_get ( double  view[])
* get viewport (10 doubles)
* 0,1,2 GL_eyeX
* 3,4,5 GL_cen
* 6 GL_Scale
* 7,8,9 GL_eyeZ
* GL_eyeX-Vektor: zeigt zum Auge des Betrachters;
* ist im Display also immer nur ein Punkt
* GL_eyeZ-Vektor: zeigt im Display ganz genau nach oben (vertikal);
* ist normal auf eyeX-Vektor.
int GL_View_dump ( )
int GL_View_set ( double *  view)
void GL_Set_Scale ( double  Scale)
void GL_Reshape ( int  width,
int  height 
int GL_Set_Cen ( Point Ucen)
int GL_Rescal1 ( Point pb1,
Point pb2,
float *  fa 
int GL_Rescal0 ( Point pb1,
Point pb2 
int GL_FeedGet ( int *  fsiz,
float **  feedBuffer,
int  idim 
* give back FeedbackBuffer
* Input:
* idim GL_2D | GL_3D | GL_3D_COLOR
* Output:
* size nr of floats in feedBuffer
* feedBuffer
void GL_Rescale ( double  scl,
Point Ucen 
* set GL_Scale,GL_cen,GL_eye_pln, GL2D.. backscales ..
* Input:
* scl GL_Scale
* Ucen GL_cen
* GL_eyeX,Y,Z must have been set before.
int GL_fix_DL_base ( int  mode)
int GL_DrawLn_Ini ( long *  ind,
int  attInd 
int GL_Surf_Ini ( long *  ind,
ColRGB col 
int GL_Tex_Ini ( long *  ind,
TexBas tb,
TexRef tr 
int GL_view_npt ( Point pta,
int  ptNr,
int  att,
long  dbi 
int GL_view_nsymB ( Point pta,
int  ptNr,
int  symCol,
int  symTyp,
long  dbi 
int GL_view_ini__ ( long  dbi,
int  oTyp,
int  attInd 
* GL_view_ini__ init GL_Disp_*
* dbi 0L do not use DispList (write into open DispList)
* -1L use dynamic DispList
* -2 to -7: GL-index of the CAD-inputObjects
* -8 to -10: outputObjects of WC_Work1; see DLI_TMP
* >=1 use/overwrite existing DispList; see DL_SetInd
* oTyp eg. Typ_PT|Typ_CVBSP|Typ_SUR see INF_OTYP
* attInd eg. Typ_Att_Fac1 see INF_ATT_CV
* see eg GL_view_npt
* see INF_GL__
void GL_Draw_Ini ( long *  ind,
int  attInd 
int GL_Draw_Ini1 ( long *  ind,
int  attInd,
int  mode 
void GL_DrawPoint ( long *  ind,
int  attInd,
Point pt1 

attInd: 0=default; 1=hili; 2=dimmed; 3=green; 4=yellow.

void GL_DrawLine ( long *  ind,
int  iAtt,
Line ln1 
* draw line
* Input:
* iAtt see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
void GL_DrawLtab ( long *  ind,
int  iAtt,
Line lna,
int  lNr 

GL_DrawLtab display group of lines

void GL_Disp_npt ( Point pa,
int  ptNr 
void GL_Disp_ln ( Point p1,
Point p2 
void GL_Disp_ln2 ( Point2 p1,
Point2 p2 
void GL_DrawPoly2D ( long *  ind,
int  iAtt,
int  ianz,
Point2  pta[],
double  zval 
void GL_create_dummy ( long *  ind)
int GL_DrawCvIpTab ( long *  ind,
int  att,
int *  iba,
int  ibNr,
Point pTab,
int  mode 
int GL_Draw_cvp_dir ( long *  ind,
int  iAtt,
int  ianz,
Point pTab 
* GL_Draw_cvp_dir display polygon and direction-arrow
* Input:
* ind nr of dispListRecord; see DL_StoreObj or DL_SetObj
* iAtt see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
* see also GL_Draw_cvp_dir
void GL_DrawPoly ( long *  ind,
int  iAtt,
int  ianz,
Point pTab 
* display Polygon. Im Array GL_ptArr30. Kreise / Kreisbögen.
* Input:
* ind nr of dispListRecord; see DL_StoreObj or DL_SetObj
* iAtt see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
* see also GL_Draw_cvp_dir
void GL_DrawRSur ( long *  ind,
int  attInd,
int  ptAnz,
Point pa1,
Point pa2 
int GL_orient__ ( int  dir)
int GL_DrawFace ( int  ptNr,
Point pta,
int  ptiNr,
short *  pti,
int  side 
int GL_DrawStrip1 ( Point ps,
Point pa1,
Point pa2,
int  ptAnz 
int GL_DrawStrip2 ( Point pa,
Point pb,
int  ptNr,
int  newS 
void GL_DrawFan ( Point pt1,
int  ptNr,
Point pa1,
int  typ,
int  newS 
void GL_Disp_nfac ( Point pTab,
Fac3 fTab,
int  fNr,
ColRGB col 
int GL_Disp_nifac ( int  fNr,
Fac3 fa,
int *  ia,
Point pa,
Vec3f va,
int  oTyp 
int GL_DrawSur ( long *  ind,
int  att,
ObjGX bMsh 
int GL_Disp_sur ( ObjGX bMsh)
int GL_ColSet ( ColRGB col)
int GL_Disp_patch ( int  gTyp,
int  ptNr,
Point pa 
int GL_Disp_ipatch ( int  gTyp,
int  iNr,
int *  ia,
Point pa 
int GL_Draw_obj ( long *  dli,
int  att,
ObjGX oxi 
int GL_Draw_BMP ( long *  dli,
AText tx1,
long  dbi 
void GL_DrawSymB ( long *  ind,
int  attInd,
int  symTyp,
Point pt1 
* display BITMAP-Symbol (SYM_TRI_S SYM_STAR_S ..)
* Input:
* ind nr of dispListRecord; see DL_StoreObj or DL_SetObj
* attInd Color ATT_COL_BLACK ATT_COL_RED ATT_COL_GREEN .. (../ut/func_types.h)
* symTyp type of symbol (../ut/gr_types.h)
* SYM_TRI_S Dreieck
* SYM_STAR_S Sternderl
* SYM_CIR_S Kreis klein
* SYM_TRI_B Viereck
void GL_DrawSymV ( long *  ind,
int  symTyp,
int  att,
Point pt1,
double  scale 
* GL_DrawSymV display symbols in x-y-plane;
void GL_DrawSymV2 ( long *  ind,
int  symTyp,
int  att,
Point pt1,
Point pt2,
double  scale 
* GL_DrawSymV2 display oriented symbols in x-y-plane; eg SYM_ARROH
* for 3D use ?
void GL_DrawVec ( long *  ind,
int  att,
Point pt1,
Vector vc1 
* draw vector with ist correct length;
* for unified length use GL_DrawSymV3 (.. SYM_ARROW)
int GL_Draw_tra ( long *  dli,
int  att,
TraRot tra 
* GL_Draw_tra display symbolic TraRot (rotation)
* see also UI_disp_tra
int GL_DrawAngA ( long *  ind,
int  att,
Point ptc,
Vector vx,
Vector vz,
double *  ang1 
* GL_DrawAngA draw angle with arrowhead
* display angle between x-vec and y-vec, with direction.
* Point pt={0., 0., 0.};
* Vector vcx={1., 0., 0.};
* Vector vcy={0., 1., 0.};
* double d1;
* long dli = -2L;
* d1 = RAD_90;
* GL_DrawAngA (&dli, 12, &pt, &vcx, &vcy, &d1);
int GL_Disp_vc ( Vector vc1,
Point pt1,
int  att 
int GL_Disp_pln__ ( double  lnS)
int GL_Disp_arrh ( Point p1,
Point p2,
Vector vcn 
int GL_Disp_vSym ( int  symTyp,
Point pt1,
Vector vc1,
double  scale,
int  att 

GL_Disp_vSym add vectorsymbols (true length) into open displist

int GL_Disp_symV ( int  symTyp,
Point pt1,
double  az,
double  ay,
double  scale 
int GL_Disp_symB ( int  symTyp,
Point pt1 
* GL_Disp_symB add bitmapsymbols into open displist
* set attributes with GL_att_sym (ATT_COL_BLUE); see INF_COL_SYMB
* see also GL_view_nsymB
int GL_Disp_nsymB ( Point pta,
int  ptNr,
int  symTyp 
* GL_Disp_nsymB display bitmap symbols
int GL_Displ_ntri ( int  triNr,
Point pta 
int GL_Disp_2D_box1 ( Point p1,
int  sx,
int  sy,
int  dx,
int  dy 
int GL_Disp_ci2 ( Point2 pc,
Point2 p1,
double  ao 
int GL_Draw_rbez ( long *  ind,
int  iAtt,
CurvRBez rb1 

GL_Draw_rbez draw rational bezier curve

int GL_Disp_rbez ( CurvRBez rb1)
* GL_Disp_rbez draw rational bezier curve
* TEST ONLY; TODO: set nr of subdivisions
int GL_Disp_cv2z ( int  pnr,
Point2 pta,
double  zVal 
int GL_Disp_inpt ( int  pnr,
Point pta,
int *  iba,
int  mode 
int GL_Disp_cv ( int  pnr,
Point pta 
int GL_DrawSymVX ( long *  ind,
int  att,
Plane pln1,
int  typ,
double  scale 
* display plane / axisSystem [with x,y,z-characters]
* att see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
* typ 1=Plane; 2=Axis; 4=Axis+Chars; 5=Plane+Axis+Chars;
* scale unused.
int GL_DrawSymVTL ( long *  ind,
int  symTyp,
int  att,
Point pt1,
double *  uScal 
void GL_DrawSymV3 ( long *  ind,
int  symTyp,
int  att,
Point pt1,
Vector vc1,
double  scale 
* GL_DrawSymV3 draw oriented vector-symbols;
* Input:
* symTyp:
* SYM_ARROW draw line with arrowhead, length normalized
* SYM_SQUARE draw rectangle normal to vc1
* SYM_PLANE draw filled rectangle normal to vc1
* SYM_AXIS1 draw x,y,z.axis normal to vc1
* SYM_AXIS draw x,y,z.axis with x,y-characters normal to vc1
* SYM_CROSS draw cross (X) normal to vc1
* SYM_CROSS1 draw symbolic scissor normal to vc1
* SYM_TRIANG draw triangle normal to vc1
* SYM_ARROH draw 2D-arrowhead-only in the x-y-plane
* SYM_ARRO3H draw 3D-arrowhead-only along vc1
* SYM_LENGTH draw line with lenght from scale; not normalized.
* att color; eg ATT_COL_RED see INF_COL_SYMB
* dli = -2L; GL_DrawSymV3 (&dli, SYM_ARROW, 12, &pt1, &vcz, 20.);
* dli = -3L; GL_DrawSymV3 (&dli, SYM_SQUARE, 12, &pt1, &vcz, 1.);
int GL_Tex_Load ( TexBas tbAct,
char *  fNam 
int GL_DrawTxtsym ( long *  ind,
int  typ,
Point pts,
Vector vc1,
int  att,
double  scl 
int GL_Draw_Tag ( long *  dli,
AText tx1,
long  dbi 
void GL_DrawTxtA ( long *  ind,
int  att,
Point P1,
char *  txt 
void GL_Disp_txtA ( Point P1,
char *  txt 
int GL_DrawDimrad ( long *  ind,
int  att,
Dimen dim1 
int GL_DrawDimdia ( long *  ind,
int  att,
Dimen dim1 
int GL_DrawDima ( long *  ind,
int  att,
Dimen dim1 
int GL_DrawLdr ( long *  ind,
int  att,
Dimen dim1 
int GL_DrawDim3 ( long *  ind,
int  att,
Dim3 dim3 
void GL_DrawDimen ( long *  ind,
int  att,
Dimen dim1 
int GL_txt__ ( int  dMod,
int  bMod,
Point ptx,
double  txAng,
double  ay,
double  az,
double  scale,
char *  txt 
* draw text
* dMod 0=linear X-mittig Y-unten
* 1=Circ.masz
* 2=Circ.masz
* 3=linear X-links Y-Mitte
* 4=Balloon
* 5=linear X-links(+2 chars) Y-unten
* bMod 0=nix, 1=farbige Hintergrungflaeche
* bMod wird auch aus txt via '[#' extrahiert !
* ptx der Textmittelpunkt unten
* txAng in Degrees
* ay ?
* az ?
* scale: AP_txdimsiz oder AP_txsiz oder explizite NoteSize.
* see also GL_DrawTxtG
int GL_Disp_sq1 ( Point p1,
Point p2 
int GL_txtss ( )
int GL_txt_ar2 ( int  hd,
Point2 ptx,
Vector2 vc 
int GL_txt_ar3 ( int  hd,
Point ptx,
Vector vcx,
Vector vcy 
int GL_DrawTxtLBG ( long *  dli,
AText tx1,
long  dbi 
int GL_DrawTxtLG ( long *  dli,
AText tx1,
long  dbi 
void GL_DrawTxtG ( long *  ind,
int  att,
GText tx1 
int GL_DrawDitto ( long *  ind,
Point p1,
Point po,
long  dlNr,
long  dlInd 
int GL_DrawDitto1 ( long *  ind,
Point p1,
Point po,
double  az1,
double  ay,
double  az2,
double  scl,
long  dlNr,
long  dlInd 
void GL_DrawDitto2 ( long *  ind,
Point p1,
double  az,
char  mir,
Ditto di 
int GL_DrawModel ( long *  ind,
int  att,
ModelRef mdr,
ModelBas mdb 
int GL_set_bgCol ( int  mode)
void GL_Clear ( )
void GL_Resize ( int  w,
int  h 
void GL_InitModelSize ( double  NewModSiz,
int  mode 
int GL_InitCol ( int  ic)
int GL_Col__ ( int  ic)
void GL_InitPtAtt ( int  ithick)

create DL-records DL_base_PtAtt until DL_base_font2

int GL_InitNewAtt ( int  mode,
int  Ind 
* create / change line-attribute in DL.
* Input:
* mode 0 = create / restore attribute-record
* 1 = change this attribute to hilited
* 2 = als dim anlegen. UNUSED
* 3 = als Hintergrundfarbe anlegen. UNUSED
* Ind is die AttributNummer;
* ein index into GR_AttTab
* all attributes have a record in the displist (glNewList);
* att.0 has dli=DL_base_LnAtt; last index is (DL_base_PtAtt - 1).
* To activate an attribute call record (DL_base_LnAtt + attrib-nr)
int GL_AttTab_dump__ ( )
void GL_InitAFont ( )
void GL_InitGFont ( )
int GL_InitGF2 ( int  ind,
int  ianz,
char  mode[],
Point2 pta 
* create charater from table of m od l plus cx,cy
* Input:
* ind DL-index
* ianz nr of mode-pta-records
* mode m (move) or l (line)
* pta endpoints
void GL_InitSymb ( )
int GL_Exit__ ( )
int GL_InitInfo ( )
void GL_Init__ ( int  mode,
int  width,
int  height 
int GL_alloc__ ( long  Ind)
* realloc space fuer BasModelnames; wird nicht gesichert !
* Ind = 0 Reset DL
* Ind = 1 increase DL (add GR_TAB_INC elements)
* Ind > 1 set size
int GL_MousePos ( Point pt1)
* compute new Mousepos and return it in userCoords
* RetCod -1: no obj under cursor ..
* get pos of last selection with sele_get_pos
int GL_Mouse2Pos ( Point pt1,
GLdouble  mx,
GLdouble  my 
int GL_SelVert__ ( Point pts)
int GL_SelVert_scan ( int  size,
float *  buffer 
int GL_SelVert_aux ( int  mode,
float *  ptf 
int GL_GetColorBits ( )

GL_GetColorBits returns Nr of ColorBits (usually 24)

double GL_query_ViewZ ( )
double GL_get_Scale ( )
int GL_GetScrSiz ( int *  ix,
int *  iy 

GL_GetScrSiz get size of graficWindow in screenCoords

int GL_Tex_Del ( int  ii)

GL_Tex_Del delete OpenGL-texture

int GL_test_error ( )
int GL_config_test ( )

see also GL_GetColorBits Retcod: 0=no, hardware does not accept textures; 1=Yes, Ok.

int GL_grid__ ( Plane gPln,
Mat_4x3  gMat,
Mat_4x3  gImat 
int GL_Disp_txt2D ( char *  sTxt)
int GL_Disp_tag2D ( int  iSizX,
int  iSizY,
int  ColGL 
* GL_Disp_tag2D display coloured rectangle
* iSizX,iSizY tagSize in screenCoords. Use GL2D_Scale for same size.
* rasterPosition must have been set
int GL_tst1 ( )

Variable Documentation

DL_Att* GR_ObjTab
Att_ln GR_AttLnTab[GR_ATT_TAB_SIZ]
ObjAtt* GA_ObjTab
int GA_recNr
int UI_InpMode
char UI_stat_view
char UI_stat_hide
int WC_modact_ind
Plane WC_sur_act

the active construction-plane

double WC_sur_Z

active Z-value of WC_sur_sur;

int WC_sur_ind

Der Index auf die ActiveConstrPlane.

Mat_4x3 WC_sur_mat

TrMat of ActiveConstrPlane only if (WC_sur_ind > 0)

Mat_4x3 WC_sur_imat

inverse TrMat of ActiveConstrPlane

int WC_stat_bound

ON OFF; Draw boundary of Flächen J/N.

double AP_txsiz


double AP_txdimsiz


double GR_tx_ldExt
double GR_tx_ardx
double GR_tx_ardy
double GR_tx_chw
double GR_tx_chh
int GR_tx_nkNr
Point* GLT_pta
long GLT_pta_SIZ
int TSU_mode
int APT_dispSOL
double APT_ModSiz
int IE_modify
unsigned int* GL_IndTab
long GL_TAB_SIZ = 0
long GL_TAB_INC = 10000
int GL_modified = 0
int GL_rub_stat = 0
ObjDB* GR_selTab = NULL
long GR_Siz_selTab = 0
int GR_nr_selTab = 0
GLfloat GL_light_2si[4] = {0.0f, 0.0f, 0.0f, 1.0f}
GLfloat GL_mod_amb1[] = {0.1f, 0.1f, 0.1f, 1.0f}
GLfloat GL_mat_spc1[] = {0.5f, 0.5f, 0.5f, 1.0f}
GLfloat GL_light_amb1[] = {0.1f, 0.1f, 0.1f, 1.0f}
GLfloat GL_light_dif1[] = {0.4f, 0.4f, 0.4f, 1.0f}
GLfloat GL_light_spc1[] = {0.5f, 0.5f, 0.5f, 1.0f}
GLfloat GL_mod_amb2[] = {0.2f, 0.2f, 0.2f, 1.0f}
GLfloat GL_mat_spc2[] = {0.8f, 0.8f, 0.8f, 1.0f}
GLfloat GL_light_amb2[] = {0.4f, 0.4f, 0.4f, 1.0f}
GLfloat GL_light_dif2[] = {0.8f, 0.8f, 0.8f, 1.0f}
GLfloat GL_light_spc2[] = {0.6f, 0.6f, 0.6f, 1.0f}
GLfloat GL_mat_hili[] = {0.8f, 0.8f, 0.8f, 1.0f}
GLfloat GL_local_view[] = { 0.0f}
GLfloat GL_light0_pos[4] = { 0.0f, 400.0f, 400.0f, 1.0f}
GLfloat GL_light0_spo[4] = { 0.0f, 0.0f, 1.0f, 0.0f}
GLfloat GLcol_t1[] = {1.0, 1.0, 0.0, 1.0}
GLfloat GLcol_black[] = {0.0, 0.0, 0.0, 0.0}
GLint LtypTab1[] = { 1, 3, 1, 2}
GLushort LtypTab2[] = {0xFFFF, 16377, 0x0FFF, 0x0FFF}
GLfloat GL_col_tab[COL_ANZ][4]
Initial value:
= {
0.0, 0.0, 0.0, 1.0,
0.1, 0.1, 0.6, 1.0,
1.0, 0.0, 0.0, 1.0,
0.0, 1.0, 0.0, 1.0,
0.0, 0.0, 1.0, 1.0,
1.0, 1.0, 0.0, 1.0,
1.0, 0.0, 1.0, 1.0,
0.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0,
0.8, 0.2, 0.2, 1.0,
0.4, 0.4, 0.7, 1.0,
0.75, 0.55, 0.55,1.0,
0.58, 0.58, 0.68,1.0,
0.55, 0.55, 0.55,1.0,
0.55, 0.15, 0.15,1.0}
GLfloat GL_col_bg[4] = {0.6, 0.6, 0.6, 1.0}
GLfloat GL_col_be[4] = {0.6, 0.4, 0.4, 1.0}
ColRGB GL_defCol
ColRGB GL_actCol
int GL_actTex
unsigned char GL_transpTab[4] = { 254, 250, 128, 64}
int GL_stat_blend = 0
int GL_stat_OnTop = 0
double GL_Scr_Siz_X
double GL_Scr_Siz_Y
double GL_fakt
double GL_Scale = 1.0
double GL_Scale_back = 1.0
double GL2D_Scale = 1.0
double GL_SclNorm
Plane GL_constr_pln
Plane GL_view_pln

Viewplane (active displayplane with the GL-RotationCenterpoint GL_cen) GL-RotationCenterpoint GL_cen is always in this plane. Always parall. to X-Y-Plane. Origin.z = z-value of RotationCenterpoint. Changes with definition of RotationCenterpoint

Point GL_cen = {0., 0., 0.}

GL_cen: centerpoint of the Viewport (in UserCoords). Is always in GL_view_pln

Plane GL_eye_pln

GLBT_ori = lower right point on GL_eye_pln in userCoords.


* vectors have userCoordinates; the length is fixed to 1.
* GL_eyeX goes from the screenCenter to the eye
* GL_eyeZ goes up - always vertical, parallel to the window outline
* GL_eyeY always is horizontal, parallel to the window outline
* GL_eye_pln plane normal to the GL_eyeX, hor along GL_eyeY ..
Vector* GL_eyeX
Vector* GL_eyeY
Vector* GL_eyeZ
double GL_angZ
double GL_angX
GLdouble GL_ModSiz = 500.
GLdouble GL_ModScale
int GL_mouse_x_act = 0
int GL_mouse_y_act = 0
Point GL_actScrPos

curPos in screenCoords

Point GL_actUsrPos

curPos in userCoords on viewPlane

int GL_Func_Act

FUNC_Idle|FUNC_Pan|FUNC_RotCen|FUNC_Rot; aus base.

GLint GL_Viewp[4]
GLdouble GL_MatMod[16]
GLdouble GL_MatProj[16]
int GL_actView = FUNC_ViewIso
int GL_initMode = 0
int GL_mode_draw_select = GR_MODE_DRAW
int GL_mode_feed = 0
int GL_mode_wire_shade = GR_STATE_WIRE
GLuint DL_Ind_tmp = 1
GLuint DL_base__
int DL_FontOff