Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

gtcdbproc.h File Reference

API for sending commands to the client through a gtcDB. More...

#include <gtcglsyms.h>

Go to the source code of this file.

Compounds

struct  _gtcBufferSwapper
struct  _gtcDBBuf
struct  _gtcIntList

Defines

#define gtcColorBufferBit   1
#define gtcDepthBufferBit   2
#define gtcAccumBufferBit   4
#define gtcStencilBufferBit   8

Typedefs

typedef struct _gtcBufferSwapper gtcBufferSwapper
 a closure for swapbuffers. More...

typedef struct _gtcIntList gtcIntList
typedef struct _gtcDBBuf  gtcDBBuf

Enumerations

enum  gtcDBCommands {
  gtcDBNop = 0, gtcDBLoadMatrix, gtcDBPerspective, gtcDBOrtho,
  gtcDBSwapBuffers, gtcDBLight, gtcDBLightv, gtcDBVertices,
  gtcDBNormals, gtcDBTexCoords, gtcDBColors, gtcDBEnableClientState,
  gtcDBDisableClientState, gtcDBDrawElements, gtcDBViewport, gtcDBClear,
  gtcDBColor, gtcDBEnable, gtcDBDisable, gtcDBDepthFunc,
  gtcDBLoadIdentity, gtcDBTexImage2D, gtcDBBindTexture, gtcDBDeleteTextures,
  gtcDBNoCommand
}

Functions

gtcDBBuf* gtc_new_buf (void)
 Create a new buffer to send GL commands to.

void gtc_buf_delete (gtcDBBuf *buf)
 Destroy a buffer.

gtcDB* gtc_pack_buf (gtcDBBuf *foo)
 After filling the buffer, send this DB to the client.

void gtc_exec_db (gtcDB *db, gtcBufferSwapper *bs, int fast_flag)
 On the client, call this to execute the GL commands.

int gtc_load_matrix (gtcDBBuf *buf, gtcReal m[4][4])
 Same as glLoadMatrix. Returns index for gtcDB, you probably don't need it.

int gtc_perspective (gtcDBBuf *buf, gtcReal fovy, gtcReal aspect, gtcReal zNear, gtcReal zFar)
 Same as gluPerspective. Returns index for gtcDB, you probably don't need it.

int gtc_ortho (gtcDBBuf *buf, gtcReal left, gtcReal right, gtcReal bottom, gtcReal top, gtcReal zNear, gtcReal zFar)
 Same as gluOrtho. Returns index for gtcDB, you probably don't need it.

int gtc_swapbuffers (gtcDBBuf *buf)
 Same as glXSwapBuffers. Returns index for gtcDB, you probably don't need it.

int gtc_light (gtcDBBuf *buf, int light, int pname, gtcReal param)
 Like glLightf. light is GTC_LIGHTi where i is between 0 and 7.

int gtc_lightv (gtcDBBuf *buf, int light, int pname, gtcReal params[])
 Like glLightfv.

int gtc_vertices (gtcDBBuf *buf, int n, gtcReal V[][3])
 as glVertexPointer. Returns index for gtcDB, you probably don't need it.

int gtc_normals (gtcDBBuf *buf, int n, gtcReal N[][3])
 as glNormalPointer. Returns index for gtcDB, you probably don't need it.

int gtc_tex_coords (gtcDBBuf *buf, int n, gtcReal T[][2])
 as glTexCoordPointer. Returns index for gtcDB, you probably don't need it.

int gtc_colors (gtcDBBuf *buf, int size, int n, char C[])
 as glColorArray. Returns index for gtcDB, you probably don't need it.

int gtc_enable_client_state (gtcDBBuf *buf, int state)
 as glEnableClientState, see gtcClientStates for possible states.

int gtc_disable_client_state (gtcDBBuf *buf, int state)
 as glDisableClientState, see gtcClientStates for possible states.

int gtc_draw_elements (gtcDBBuf *buf, int mode, int n, unsigned index[])
 as glDrawElements. Returns index for gtcDB, you probably don't need it.

int gtc_viewport (gtcDBBuf *buf, unsigned x, unsigned y, unsigned w, unsigned h)
 as glViewport. Returns index for gtcDB, you probably don't need it.

int gtc_tex_image_2d (gtcDBBuf *buf, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, unsigned bytes_of_pixels, unsigned char *pixels)
 as glTexImage2D.

int gtc_clear (gtcDBBuf *buf, int mask)
 as glClear.

int gtc_color (gtcDBBuf *buf, int n, char c[])
 as glColor[3,4]b.

int gtc_enable (gtcDBBuf *buf, int cap)
 as glEnable.

int gtc_disable (gtcDBBuf *buf, int cap)
 as glDisable.

int gtc_depth_func (gtcDBBuf *buf, int func)
 as glDepthFunc.

int gtc_load_identity (gtcDBBuf *buf)
 as glLoadIdentity.

int gtc_bind_texture (gtcDBBuf *buf, unsigned target, unsigned texture)
 as glBindTexture.

int gtc_delete_textures (gtcDBBuf *buf, unsigned n, unsigned textures[])
 as glDeleteTextures.

void gtc_client_send (gtcClient *cli, gtcDBBuf *buf)
 Sends the gtcDBBuf to the specified client.

void gtc_server_send (gtcServer *s, int client, gtcDBBuf *buf)
 Sends a gtcDBBuf to the specified client.


Detailed Description

API for sending commands to the client through a gtcDB.

To talk to a client, you create a database containing all the commands it needs to run. These will typically be a bunch of OpenGL calls.


Typedef Documentation

typedef struct _gtcBufferSwapper gtcBufferSwapper
 

a closure for swapbuffers.

When you call gtc_exec_db(), some of the commands could be swapbuffers. In that case, on X a glXSwapBuffers call needs to be made, with the appropriate display pointer. On other OS's (eg, win32), the call and parameters are different. To keep gtc as OS agnostic as possible, this is a callback that will be used whenever GTC wants to swap the buffers.


Generated at Sat Jul 14 18:53:52 2001 for GTC by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001