a few win32-related compilation fixes

metadata
Wenzel Jakob 2011-03-01 16:13:18 +01:00
parent 787548d36c
commit dc801e7d6c
7 changed files with 21 additions and 12 deletions

View File

@ -21,6 +21,8 @@
#include <mitsuba/mitsuba.h>
MTS_NAMESPACE_BEGIN
/**
* \headerfile mitsuba/core/tls.h mitsuba/mitsuba.h
* \brief Thin wrapper around posix thread local storage.
@ -159,4 +161,6 @@ private:
pthread_key_t m_key;
};
MTS_NAMESPACE_END
#endif /* __TLS_H */

View File

@ -30,10 +30,23 @@
#include <GL/glext.h>
#endif
struct GLEWContextStruct;
/// Get the per-thread context for GLEW-MX
extern GLEWContextStruct *glewGetContext();
MTS_NAMESPACE_BEGIN
/**
* \brief Specifies the maximum number of triangles that can
* be sent to the GPU in one batch. This is useful to
* avoid freezing the OS when dealing with huge inputs.
*/
#define MTS_GL_MAX_QUEUED_TRIS 500000
/**
* \brief OpenGL implementation of the \ref Renderer interface
*/
class MTS_EXPORT_HW GLRenderer : public Renderer {
public:
/// Construct a new OpenGL rendering interface

View File

@ -26,8 +26,6 @@
MTS_NAMESPACE_BEGIN
extern GLEWContext *glewGetContext();
GLGeometry::GLGeometry(const TriMesh *mesh)
: GPUGeometry(mesh), m_vertexID(0), m_indexID(0) {
}

View File

@ -27,8 +27,6 @@
MTS_NAMESPACE_BEGIN
extern GLEWContext *glewGetContext();
GLProgram::GLProgram(const std::string &name)
: GPUProgram(name) {
m_id[0] = m_id[1] = m_program = 0;

View File

@ -30,14 +30,14 @@
#include <mitsuba/hw/glsync.h>
#include <mitsuba/hw/font.h>
MTS_NAMESPACE_BEGIN
static mitsuba::PrimitiveThreadLocal<GLEWContextStruct> glewContext;
PrimitiveThreadLocal<GLEWContext> glewContext;
GLEWContext *glewGetContext() {
GLEWContextStruct *glewGetContext() {
return &glewContext.get();
}
MTS_NAMESPACE_BEGIN
GLRenderer::GLRenderer(Session *session)
: Renderer(session) {
}

View File

@ -28,8 +28,6 @@
MTS_NAMESPACE_BEGIN
extern GLEWContext *glewGetContext();
GLSync::GLSync() : GPUSync(), m_sync(0) {
}

View File

@ -30,8 +30,6 @@
MTS_NAMESPACE_BEGIN
extern GLEWContext *glewGetContext();
GLTexture::GLTexture(const std::string &name, Bitmap *bitmap)
: GPUTexture(name, bitmap), m_id(0), m_extraId(0), m_needsUpdate(true) {
}