Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gfxlib_struct_server.cpp
Go to the documentation of this file.
1 #include "gfxlib_struct.h"
2 #include <stdlib.h>
3 #include <string.h>
4 GFXLight::GFXLight( const bool enabled,
5  const GFXColor &vect,
6  const GFXColor &diffuse,
7  const GFXColor &specular,
8  const GFXColor &ambient,
9  const GFXColor &attenuate,
10  const GFXColor &direction,
11  float exp,
12  float cutoff,
13  float size ) {}
15 
18 
19 void GFXVertexList::Draw( enum POLYTYPE poly, int numV ) {}
20 void GFXVertexList::Draw( enum POLYTYPE poly, int numV, unsigned char *index ) {}
21 void GFXVertexList::Draw( enum POLYTYPE poly, int numV, unsigned short *index ) {}
22 void GFXVertexList::Draw( enum POLYTYPE poly, int numV, unsigned int *index ) {}
23 GFXVertexList::VDAT* GFXVertexList::Map( bool read, bool write )
24 {
25  return &data;
26 }
27 void GFXVertexList::UnMap() {}
28 
29 //private, only for inheriters
31  numVertices(0),
32  mode(0),
33  unique_mode(0),
34  display_list(0),
35  vbo_data(0),
36  numlists(0),
37  offsets(0),
38  changed(0)
39 {
40  // ctor
41 }
42 
45 {
46  return &data;
47 }
49 void GFXVertexList::EndMutate( int newvertexsize )
50 {
51  if ( !(changed&CHANGE_MUTABLE) )
56  changed &= (~CHANGE_CHANGE);
57  if (newvertexsize)
58  numVertices = newvertexsize;
59 }
60 
62 
64 {}
65 void GFXVertexList::Draw( enum POLYTYPE *mode, const INDEX index, const int numlists, const int *offsets ) {}
66 
67 extern GFXBOOL /*GFXDRVAPI*/ GFXGetMaterial( const unsigned int number, GFXMaterial &material )
68 {
69  return GFXFALSE;
70 }
71 extern void /*GFXDRVAPI*/ GFXSetMaterial( unsigned int &number, const GFXMaterial &material ) {}
73 extern int /*GFXDRVAPI*/ GFXCreateList()
74 {
75  return 0;
76 }
78 extern GFXBOOL /*GFXDRVAPI*/ GFXEndList()
79 {
80  return GFXFALSE;
81 }
83 extern void /*GFXDRVAPI*/ GFXDeleteList( int list ) {}
85 {
86  if (offsets)
87  delete[] offsets;
88  if (mode)
89  delete[] mode;
90  if (changed&HAS_COLOR) {
91  if (data.colors)
92  free( data.colors );
93  } else if (data.vertices) {
94  free( data.vertices );
95  }
96 }
97