diff options
author | Stijn Buys <ingar@osirion.org> | 2011-02-10 18:07:24 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-02-10 18:07:24 +0000 |
commit | 9ff5cf6184b9c5183c1f55cfa6c0d08586eb02c9 (patch) | |
tree | d50dd2d8ed48acfbb7063d4c073f77cb195106f7 /src/render | |
parent | a255dbc032d15a4f5024bc60baa19c45ebceecc6 (diff) |
Added a local chat channel. The say command defaults to zone chat, global messages can be send with the shout command.
Removed NonSolid flag fro race objects, have race use the local chat channel.
Updated to network protocol version 22.
Updated developer documentation.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/gl.cc | 8 | ||||
-rw-r--r-- | src/render/gl.h | 33 |
2 files changed, 30 insertions, 11 deletions
diff --git a/src/render/gl.cc b/src/render/gl.cc index ebba733..e416943 100644 --- a/src/render/gl.cc +++ b/src/render/gl.cc @@ -14,10 +14,10 @@ using math::Vector2f; using math::Vector3f; using math::Color; -genbuffers_func genbuffers = 0; -deletebuffers_func deletebuffers = 0; -bindbuffer_func bindbuffer = 0; -bufferdata_func bufferdata = 0; +genbuffers_func genbuffers = 0; +deletebuffers_func deletebuffers = 0; +bindbuffer_func bindbuffer = 0; +bufferdata_func bufferdata = 0; std::string renderer() { diff --git a/src/render/gl.h b/src/render/gl.h index c230547..51e215c 100644 --- a/src/render/gl.h +++ b/src/render/gl.h @@ -20,35 +20,53 @@ #ifdef _WIN32 #ifndef GL_RESCALE_NORMAL -#define GL_RESCALE_NORMAL 0x803A +#define GL_RESCALE_NORMAL 0x803A #endif #ifndef GL_TEXTURE_MAX_LEVEL -#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_TEXTURE_MAX_LEVEL 0x813D #endif #ifndef GL_GENERATE_MIPMAP -#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP 0x8191 #endif #ifndef GL_REFLECTION_MAP -#define GL_REFLECTION_MAP 0x8512 +#define GL_REFLECTION_MAP 0x8512 #endif #ifndef GL_CLAMP_TO_EDGE -#define GL_CLAMP_TO_EDGE 0x812F +#define GL_CLAMP_TO_EDGE 0x812F #endif #ifndef GL_ARRAY_BUFFER -#define GL_ARRAY_BUFFER 0x8892 +#define GL_ARRAY_BUFFER 0x8892 #endif #ifndef GL_STATIC_DRAW -#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_DRAW 0x88E4 #endif #endif // _WIN32 +/* + * @brief wrapper class for OpenGL functions + * The gl class accesses the OpenGL library functions + * through function pointers. + * This allows loading the library at runtime + * and makes static builds possible + */ +/* +class GL { + +private: + typedef void (* APIENTRY gl_genbuffers_func)(GLuint count, GLuint *id); + typedef void (* APIENTRY gl_deletebuffers_func)(GLuint count, GLuint *id); + typedef void (* APIENTRY gl_bindbuffer_func)(GLenum target, GLuint id); + typedef void (* APIENTRY gl_bufferdata_func)(GLenum target, GLsizei size, const GLvoid *data, GLenum usage); + +} +*/ /// wrapper namespace for OpenGL operations /** The gl namespace provides a wrapper to the OpenGL library functions. * All methods take floats or Vector3f and Color as parameters. @@ -83,6 +101,7 @@ void viewport(GLint x, GLint y, GLsizei width, GLsizei height); /// set the color used to clear to buffer void clearcolor(math::Color const &color); + void clearcolor(const float r, const float g, const float b, const float a); /// clear buffers to preset values |