--- /dev/null
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#define GL_GLEXT_PROTOTYPES
+#include "blend.h"
+
+namespace Msp {
+namespace GL {
+
+void blend_equation(BlendEquation eq)
+{
+ glBlendEquation(eq);
+}
+
+void blend_func(BlendFactor src, BlendFactor dst)
+{
+ glBlendFunc(src, dst);
+}
+
+} // namespace GL
+} // namespace Msp
--- /dev/null
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GL_BLEND_H_
+#define MSP_GL_BLEND_H_
+
+#include "gl.h"
+
+namespace Msp {
+namespace GL {
+
+enum BlendEquation
+{
+ ADD = GL_FUNC_ADD,
+ SUBTRACT = GL_FUNC_SUBTRACT,
+ REVERSE_SUBTRACT = GL_FUNC_REVERSE_SUBTRACT,
+ MIN = GL_MIN,
+ MAX = GL_MAX
+};
+
+enum BlendFactor
+{
+ ZERO = GL_ZERO,
+ ONE = GL_ONE,
+ SRC_COLOR = GL_SRC_COLOR,
+ ONE_MINUS_SRC_COLOR = GL_ONE_MINUS_SRC_COLOR,
+ SRC_ALPHA = GL_SRC_ALPHA,
+ ONE_MINUS_SRC_ALPHA = GL_ONE_MINUS_SRC_ALPHA,
+ DST_COLOR = GL_DST_COLOR,
+ ONE_MINUS_DST_COLOR = GL_ONE_MINUS_DST_COLOR,
+ DST_ALPHA = GL_DST_ALPHA,
+ ONE_MINUS_DST_ALPHA = GL_ONE_MINUS_DST_ALPHA,
+ CONSTANT_COLOR = GL_CONSTANT_COLOR,
+ ONE_MINUS_CONSTANT_COLOR = GL_ONE_MINUS_CONSTANT_COLOR,
+ CONSTANT_ALPHA = GL_CONSTANT_ALPHA,
+ ONE_MINUS_CONSTANT_ALPHA = GL_ONE_MINUS_CONSTANT_ALPHA
+};
+
+void blend_equation(BlendEquation eq);
+void blend_func(BlendFactor src, BlendFactor dst);
+
+} // namespace GL
+} // namespace Msp
+
+#endif
--- /dev/null
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#include "clip.h"
+#include "gl.h"
+
+namespace Msp {
+namespace GL {
+
+ClipPlane::ClipPlane(double a, double b, double c, double d)
+{
+ eq[0]=a;
+ eq[1]=b;
+ eq[2]=c;
+ eq[3]=d;
+}
+
+void ClipPlane::apply_to(unsigned n)
+{
+ glClipPlane(GL_CLIP_PLANE0+n, eq);
+ glEnable(GL_CLIP_PLANE0+n);
+}
+
+void ClipPlane::disable(unsigned n)
+{
+ glDisable(GL_CLIP_PLANE0+n);
+}
+
+} // namespace GL
+} // namespace Msp
--- /dev/null
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GL_CLIP_H_
+#define MSP_GL_CLIP_H_
+
+namespace Msp {
+namespace GL {
+
+class ClipPlane
+{
+public:
+ double eq[4];
+
+ ClipPlane(double, double, double, double);
+ void apply_to(unsigned);
+
+ static void disable(unsigned);
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif
select_buf=&buf;
}
+void init_names()
+{
+ glInitNames();
+}
+
+void push_name(uint n)
+{
+ glPushName(n);
+}
+
+void pop_name()
+{
+ glPopName();
+}
+
+void load_name(uint n)
+{
+ glLoadName(n);
+}
+
void parse_select_records(const uint *buf, uint count, vector<SelectRecord> &tbuf)
{
uint i=0;
};
void select_buffer(std::vector<SelectRecord> &);
+void init_names();
+void push_name(uint);
+void pop_name();
+void load_name(uint);
+
void parse_select_records(const uint *buf, uint, std::vector<SelectRecord> &);
void _parse_internal_select_records(uint);