Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
OpenGLArea.c File Reference
#include "OpenGLAreaP.h"
#include <X11/StringDefs.h>
#include <GL/glx.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define athis   ((OpenGLAreaWidget)This)->openGLArea
 
#define acur   ((OpenGLAreaWidget)a_current)->openGLArea
 
#define CWarn   printf
 
#define CWarnF   printf
 
#define IFMOD(a_field)   if(athis.a_field != acur.a_field)
 

Functions

void OpenGLAreaPaint (Widget This)
 
int OpenGLAreaWrite_gl2ps (Widget w, const char *f, const char *o)
 

Variables

OpenGLAreaClassRec openGLAreaClassRec
 
WidgetClass openGLAreaWidgetClass = (WidgetClass) &openGLAreaClassRec
 

Macro Definition Documentation

◆ acur

#define acur   ((OpenGLAreaWidget)a_current)->openGLArea

Definition at line 36 of file OpenGLArea.c.

◆ athis

#define athis   ((OpenGLAreaWidget)This)->openGLArea

Definition at line 35 of file OpenGLArea.c.

◆ CWarn

#define CWarn   printf

Definition at line 37 of file OpenGLArea.c.

◆ CWarnF

#define CWarnF   printf

Definition at line 38 of file OpenGLArea.c.

◆ IFMOD

#define IFMOD (   a_field)    if(athis.a_field != acur.a_field)

Definition at line 250 of file OpenGLArea.c.

Function Documentation

◆ OpenGLAreaPaint()

void OpenGLAreaPaint ( Widget  This)

Definition at line 317 of file OpenGLArea.c.

317 {
318 if(!XtIsRealized(This)) return;
319 if(MakeCurrent(This)==1) {
321 value.reason = XoCR_PAINT;
322 value.event = 0;
323 XtCallCallbacks(This,XoNpaintCallback,(XtPointer)&value);
324 glXSwapBuffers(XtDisplay(This),XtWindow(This));
325 glXMakeCurrent(XtDisplay(This),None,NULL);
326 }
327}
#define XoCR_PAINT
Definition: OpenGLArea.h:19
#define XoNpaintCallback
Definition: OpenGLArea.h:16

◆ OpenGLAreaWrite_gl2ps()

int OpenGLAreaWrite_gl2ps ( Widget  w,
const char *  f,
const char *  o 
)

Definition at line 392 of file OpenGLArea.c.

392{return 1;}

Variable Documentation

◆ openGLAreaClassRec

OpenGLAreaClassRec openGLAreaClassRec

Definition at line 49 of file OpenGLArea.c.

◆ openGLAreaWidgetClass

WidgetClass openGLAreaWidgetClass = (WidgetClass) &openGLAreaClassRec

Definition at line 100 of file OpenGLArea.c.