Commit 46417680 by Kai Westerkamp

A4

parent 7ae7a078
...@@ -11,6 +11,7 @@ GPU Computing / GPGPU Praktikum source code. ...@@ -11,6 +11,7 @@ GPU Computing / GPGPU Praktikum source code.
#include <sstream> #include <sstream>
#include <cstring> #include <cstring>
using namespace std; using namespace std;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -49,6 +50,7 @@ CConvolutionSeparableTask::CConvolutionSeparableTask( ...@@ -49,6 +50,7 @@ CConvolutionSeparableTask::CConvolutionSeparableTask(
m_FileNamePostfix = "Separable_" + OutFileName; m_FileNamePostfix = "Separable_" + OutFileName;
m_ProgramName = "ConvolutionSeparable.cl"; m_ProgramName = "ConvolutionSeparable.cl";
} }
CConvolutionSeparableTask::~CConvolutionSeparableTask() CConvolutionSeparableTask::~CConvolutionSeparableTask()
...@@ -57,6 +59,7 @@ CConvolutionSeparableTask::~CConvolutionSeparableTask() ...@@ -57,6 +59,7 @@ CConvolutionSeparableTask::~CConvolutionSeparableTask()
delete [] m_hKernelVertical; delete [] m_hKernelVertical;
ReleaseResources(); ReleaseResources();
} }
bool CConvolutionSeparableTask::InitResources(cl_device_id Device, cl_context Context) bool CConvolutionSeparableTask::InitResources(cl_device_id Device, cl_context Context)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "CConvolutionTaskBase.h" #include "CConvolutionTaskBase.h"
#include <string> #include <string>
#include <fstream>
//! A3 / T2 separable convolution //! A3 / T2 separable convolution
class CConvolutionSeparableTask : public CConvolutionTaskBase class CConvolutionSeparableTask : public CConvolutionTaskBase
...@@ -86,6 +87,8 @@ protected: ...@@ -86,6 +87,8 @@ protected:
cl_kernel m_HorizontalKernel = nullptr; cl_kernel m_HorizontalKernel = nullptr;
//vertical convolution pass //vertical convolution pass
cl_kernel m_VerticalKernel = nullptr; cl_kernel m_VerticalKernel = nullptr;
}; };
#endif // _CCONVOLUTION_SEPARABLE_TASK_H #endif // _CCONVOLUTION_SEPARABLE_TASK_H
File added
/******************************************************************************
.88888. 888888ba dP dP
d8' `88 88 `8b 88 88
88 a88aaaa8P' 88 88
88 YP88 88 88 88
Y8. .88 88 Y8. .8P
`88888' dP `Y88888P'
a88888b. dP oo
d8' `88 88
88 .d8888b. 88d8b.d8b. 88d888b. dP dP d8888P dP 88d888b. .d8888b.
88 88' `88 88'`88'`88 88' `88 88 88 88 88 88' `88 88' `88
Y8. .88 88. .88 88 88 88 88. .88 88. .88 88 88 88 88 88. .88
Y88888P' `88888P' dP dP dP 88Y888P' `88888P' dP dP dP dP `8888P88
88 .88
dP d8888P
******************************************************************************/
#ifndef _CASSIGNMENT4_H
#define _CASSIGNMENT4_H
#include "../Common/CAssignmentBase.h"
#include "../Common/IGUIEnabledComputeTask.h"
#include "../Common/CTimer.h"
#include "GLCommon.h"
//! Assignment4
class CAssignment4 : public CAssignmentBase
{
public:
virtual ~CAssignment4();
static CAssignment4* GetSingleton();
//! We overload this method to define OpenGL callbacks and to support CL-GL context sharing
virtual bool EnterMainLoop(int argc, char** argv);
virtual bool DoCompute();
virtual bool InitGL(int argc, char** argv);
virtual void CleanupGL();
// GLFW callback functions
// NOTE: these have to be static, as GLFW does not support ptrs to member functions
static void OnKeyboardCallback(GLFWwindow* Window, int Key, int ScanCode, int Action, int Mods);
static void OnMouseCallback(GLFWwindow* Window, int Button, int State, int Mods);
static void OnMouseMoveCallback(GLFWwindow* window, double X, double Y);
static void OnWindowResizedCallback(GLFWwindow* window, int Width, int Height);
protected:
// ctor is protected to enforce singleton pattern
CAssignment4();
// We also had to overload this, as we use a special context initialization
// for OpenCL - OpenGL interop
virtual bool InitCLContext();
virtual void Render();
virtual void OnKeyboard(GLFWwindow* pWindow, int Key, int ScanCode, int Action, int Mods);
virtual void OnMouse(GLFWwindow* pWindow, int Button, int State, int Mods);
virtual void OnMouseMove(GLFWwindow* pWindow, double X, double Y);
virtual void OnIdle();
virtual void OnWindowResized(GLFWwindow* pWindow, int Width, int Height);
protected:
GLFWwindow* m_Window;
int m_WindowWidth;
int m_WindowHeight;
IGUIEnabledComputeTask* m_pCurrentTask;
size_t m_LocalWorkSize[3];
static CAssignment4* s_pSingletonInstance;
// for the physical simulation we need to keep track of the time between frames rendered
CTimer m_FrameTimer;
double m_PrevTime;
};
#endif // _CASSIGNMENT4_H
/******************************************************************************
.88888. 888888ba dP dP
d8' `88 88 `8b 88 88
88 a88aaaa8P' 88 88
88 YP88 88 88 88
Y8. .88 88 Y8. .8P
`88888' dP `Y88888P'
a88888b. dP oo
d8' `88 88
88 .d8888b. 88d8b.d8b. 88d888b. dP dP d8888P dP 88d888b. .d8888b.
88 88' `88 88'`88'`88 88' `88 88 88 88 88 88' `88 88' `88
Y8. .88 88. .88 88 88 88 88. .88 88. .88 88 88 88 88 88. .88
Y88888P' `88888P' dP dP dP 88Y888P' `88888P' dP dP dP dP `8888P88
88 .88
dP d8888P
******************************************************************************/
#ifndef _CCLOTH_SIMULATION_TASK_H
#define _CCLOTH_SIMULATION_TASK_H
#include "../Common/IGUIEnabledComputeTask.h"
#include "CTriMesh.h"
#include "CGLTexture.h"
//! A4 / T2 Cloth simulation
/*!
Note that this task does not implement a CPU reference result, all simulation is
running on the GPU. The methods related to the evaluation of the correctness of the
kernel are therefore meaningless (not implemented).
*/
class CClothSimulationTask : public IGUIEnabledComputeTask
{
public:
CClothSimulationTask(unsigned int ClothResX, unsigned int ClothResY);
virtual ~CClothSimulationTask();
// IComputeTask
virtual bool InitResources(cl_device_id Device, cl_context Context);
virtual void ReleaseResources();
virtual void ComputeGPU(cl_context Context, cl_command_queue CommandQueue, size_t LocalWorkSize[3]);
// Not implemented!
virtual void ComputeCPU() {};
virtual bool ValidateResults() {return false;};
// IGUIEnabledComputeTask
virtual void Render();
virtual void OnKeyboard(int Key, int Action);
virtual void OnMouse(int Button, int State);
virtual void OnMouseMove(int X, int Y);
virtual void OnIdle(double Time, float ElapsedTime);
virtual void OnWindowResized(int Width, int Height);
protected:
unsigned int m_ClothResX = 0;
unsigned int m_ClothResY = 0;
unsigned int m_FrameCounter = 0;
CTriMesh* m_pClothModel = nullptr;
CTriMesh* m_pEnvironment = nullptr;
CGLTexture* m_pClothTexture = nullptr;
GLUquadricObj* m_pSphere = nullptr;
float m_SphereRadius = 0.2f;
hlsl::float4 m_SpherePos = hlsl::float4(0.0f, 0.0f, 0.0f, 1.0f);
// OpenGL variables
GLhandleARB m_VSCloth = 0;
GLhandleARB m_PSCloth = 0;
GLhandleARB m_ProgRenderCloth = 0;
GLhandleARB m_VSMesh = 0;
GLhandleARB m_PSMesh = 0;
GLhandleARB m_ProgRenderMesh = 0;
// OpenCL variables
//device buffers for cloth simulation
cl_mem m_clPosArray = nullptr; //current position of the particles (shared with OpenGL)
cl_mem m_clPosArrayOld = nullptr;
cl_mem m_clPosArrayAux = nullptr;
cl_mem m_clNormalArray = nullptr;
cl_program m_ClothSimProgram = nullptr;
cl_kernel m_NormalKernel = nullptr;
cl_kernel m_IntegrateKernel = nullptr;
cl_kernel m_ConstraintKernel = nullptr;
cl_kernel m_CollisionsKernel = nullptr;
float m_ElapsedTime = 0.0f;
float m_PrevElapsedTime = 0.0f;
float m_simulationTime = 0.0f;
bool m_KeyboardMask[255];
bool m_InspectCloth = false;
// mouse
int m_Buttons = 0;
int m_PrevX = 0;
int m_PrevY = 0;
//for camera handling
float m_RotateX = 0.0f;
float m_RotateY = 0.0f;
float m_TranslateZ = -2.0f;
};
#endif // _CCLOTH_SIMULATION_TASK_H
////////////////////////////////////////////////////////////
// //
// Simple OpenGL Texture Loader //
// (w)(c)2007 Carsten Dachsbacher //
// //
////////////////////////////////////////////////////////////
#include "CGLTexture.h"
#include <stdio.h>
#ifdef _MSC_VER
#pragma warning ( disable : 4996 )
#endif
CGLTexture::CGLTexture( bool _rectangular )
{
ID = 0;
if (_rectangular )
target = GL_TEXTURE_RECTANGLE_ARB; else
target = GL_TEXTURE_2D;
}
CGLTexture::~CGLTexture()
{
deleteTexture();
}
bool CGLTexture::createTexture()
{
deleteTexture();
glGenTextures( 1, &ID );
ID ++;
glBindTexture ( target, ID - 1 );
glTexParameterf( target, GL_TEXTURE_WRAP_S, GL_REPEAT );
glTexParameterf( target, GL_TEXTURE_WRAP_T, GL_REPEAT );
glTexParameterf( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR );
glTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
return true;
}
void CGLTexture::deleteTexture()
{
if( ID )
{
ID --;
glDeleteTextures( 1, &ID );
ID = 0;
}
}
void CGLTexture::bind()
{
glBindTexture( target, ID - 1 );
}
#define TGA_RGB 2 // RGB file
#define TGA_A 3 // ALPHA file
#define TGA_RLE 10 // run-length encoded
bool CGLTexture::loadTGA( const char *filename )
{
unsigned short wwidth,
wheight;
unsigned char length,
imageType,
bits;
unsigned long stride,
channels;
unsigned char *data;
width = height = 0;
createTexture();
FILE *f;
if( ( f = fopen( filename, "rb" ) ) == NULL )
{
fprintf( stderr, "[texture]: error opening file '%s'\n", filename );
return false;
}
fread( &length, sizeof( unsigned char ), 1, f );
fseek( f, 1, SEEK_CUR );
fread( &imageType, sizeof( unsigned char ), 1, f );
fseek( f, 9, SEEK_CUR );
fread( &wwidth, sizeof( unsigned short ), 1, f );
fread( &wheight, sizeof( unsigned short ), 1, f );
fread( &bits, sizeof( unsigned char ), 1, f );
width = wwidth;
height = wheight;
fseek( f, length + 1, SEEK_CUR );
// umcompressed image file
if( imageType != TGA_RLE )
{
// true color
if( bits == 24 || bits == 32 )
{
channels = bits / 8;
stride = channels * width;
data = new unsigned char[ stride * height ];
for( int y = 0; y < height; y++ )
{
unsigned char *pLine = &( data[ stride * y ] );
fread( pLine, stride, 1, f );
for( int i = 0; i < (int)stride; i += channels )
{
unsigned char temp = pLine[ i ];
pLine[ i ] = pLine[ i + 2 ];
pLine[ i + 2 ] = temp;
}
}
} else
// hi color
if( bits == 16 )
{
unsigned short pixels = 0;
int r, g, b;
channels = 3;
stride = channels * width;
data = new unsigned char[ stride * height ];
for( int i = 0; i < (int)(width*height); i++ )
{
fread( &pixels, sizeof(unsigned short), 1, f );
b = ( pixels & 0x1f ) << 3;
g = ( ( pixels >> 5 ) & 0x1f ) << 3;
r = ( ( pixels >> 10 ) & 0x1f ) << 3;
data[ i * 3 + 0 ] = (unsigned char) r;
data[ i * 3 + 1 ] = (unsigned char) g;
data[ i * 3 + 2 ] = (unsigned char) b;
}
} else
return false;
} else
// RLE compressed image
{
unsigned char rleID = 0;
int colorsRead = 0;
channels = bits / 8;
stride = channels * width;
data = new unsigned char[ stride * height ];
unsigned char *pColors = new unsigned char [ channels ];
int i = 0;
while( i < width * height )
{
fread( &rleID, sizeof( unsigned char ), 1, f );
if( rleID < 128 )
{
rleID++;
while( rleID )
{
fread( pColors, sizeof( unsigned char ) * channels, 1, f );
data[ colorsRead + 0 ] = pColors[ 2 ];
data[ colorsRead + 1 ] = pColors[ 1 ];
data[ colorsRead + 2 ] = pColors[ 0 ];
if ( bits == 32 )
data[ colorsRead + 3 ] = pColors[ 3 ];
i ++;
rleID --;
colorsRead += channels;
}
} else
{
rleID -= 127;
fread( pColors, sizeof( unsigned char ) * channels, 1, f );
while( rleID )
{
data[ colorsRead + 0 ] = pColors[ 2 ];
data[ colorsRead + 1 ] = pColors[ 1 ];
data[ colorsRead + 2 ] = pColors[ 0 ];
if ( bits == 32 )
data[ colorsRead + 3 ] = pColors[ 3 ];
i ++;
rleID --;
colorsRead += channels;
}
}
}
delete[] pColors;
}
fclose( f );
if ( channels == 4 )
gluBuild2DMipmaps( target, 4, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data ); else
gluBuild2DMipmaps( target, 3, width, height, GL_RGB, GL_UNSIGNED_BYTE, data );
delete[] data;
fprintf( stderr, "[texture]: loaded '%s'\n", filename );
return true;
}
////////////////////////////////////////////////////////////
// //
// Simple OpenGL Texture Loader //
// (w)(c)2007 Carsten Dachsbacher //
// //
////////////////////////////////////////////////////////////
#ifndef __TEXTURE_H
#define __TEXTURE_H
#include "GLCommon.h"
class CGLTexture
{
private:
void deleteTexture();
bool createTexture();
GLenum target;
int width, height;
GLuint ID;
public:
CGLTexture( bool _rectangular = false );
~CGLTexture();
GLuint getID() { return ID-1; };
int getWidth() { return width; };
int getHeight() { return height; };
bool loadTGA ( const char *fileName );
void bind();
};
#endif
cmake_minimum_required (VERSION 2.8.3)
project (GPUComputing)
# Add our modules to the path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake/")
include(CheckCXXCompilerFlag)
if (WIN32)
else (WIN32)
#set (EXTRA_COMPILE_FLAGS "-Wall -Werror")
set (EXTRA_COMPILE_FLAGS "-Wall")
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAS_CXX_11)
if (HAS_CXX_11)
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -std=c++11")
message(STATUS "Enabling C++11 support")
else(HAS_CXX_11)
message(WARNING "No C++11 support detected, build will fail.")
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")
endif (WIN32)
# Include support for changing the working directory in Visual Studio
include(ChangeWorkingDirectory)
# Search for OpenCL and add paths
find_package( OpenCL REQUIRED )
include_directories( ${OPENCL_INCLUDE_DIRS} )
# Include Common module
add_subdirectory (../Common ${CMAKE_BINARY_DIR}/Common)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "fwrwere")
set(GLFW_BUILD_TESTS OFF CACHE BOOL "aegegherh")
set(GLFW_BUILD_DOCS OFF CACHE BOOL "aegegherh")
set(GLFW_INSTALL OFF CACHE BOOL "fasdfa")
add_subdirectory(glfw)
include_directories(glfw/include)
add_subdirectory(glew)
include_directories(glew/include)
# Define source files for this assignment
set(sources
clothsim.cl
ParticleSystem.cl
Scan.cl
CClothSimulationTask.cpp
CParticleSystemTask.cpp
CAssignment4.cpp
CTriMesh.cpp
CGLTexture.cpp
GLCommon.cpp
main.cpp
HLSL.cpp
forcefield.frag
mesh.frag
meshtextured.frag
particles.frag
CClothSimulationTask.h
CParticleSystemTask.h
CAssignment4.h
CTriMesh.h
CGLTexture.h
GLCommon.h
HLSL.h
HLSLEx.h
forcefield.vert
mesh.vert
meshtextured.vert
particles.vert
)
ADD_EXECUTABLE (Assignment
${sources}
)
# Link required libraries
set(GLEW_LIBRARIES "glew")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(GLEW_LIBRARIES "${GLEW_LIBRARIES}64")
else()
set(GLEW_LIBRARIES "${GLEW_LIBRARIES}32")
endif()
set(GLU_LIBRARIES "GLU")
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(GLU_LIBRARIES "${GLU_LIBRARIES}64")
else()
set(GLU_LIBRARIES "${GLU_LIBRARIES}32")
endif()
endif()
target_link_libraries(Assignment ${OPENCL_LIBRARIES} glfw ${GLFW_LIBRARIES} ${GLEW_LIBRARIES} ${GLU_LIBRARIES})
target_link_libraries(Assignment GPUCommon)
if (WIN32)
add_custom_command(TARGET Assignment POST_BUILD COMMAND ${CMAKE_COMMAND} -E $<1:copy_if_different> $<0:echo> $<TARGET_FILE_DIR:${GLEW_LIBRARIES}>/${GLEW_LIBRARIES}.dll $<1:$<TARGET_FILE_DIR:Assignment>> )
change_workingdir(Assignment ${CMAKE_SOURCE_DIR})
endif()
/******************************************************************************
.88888. 888888ba dP dP
d8' `88 88 `8b 88 88
88 a88aaaa8P' 88 88
88 YP88 88 88 88
Y8. .88 88 Y8. .8P
`88888' dP `Y88888P'
a88888b. dP oo
d8' `88 88
88 .d8888b. 88d8b.d8b. 88d888b. dP dP d8888P dP 88d888b. .d8888b.
88 88' `88 88'`88'`88 88' `88 88 88 88 88 88' `88 88' `88
Y8. .88 88. .88 88 88 88 88. .88 88. .88 88 88 88 88 88. .88
Y88888P' `88888P' dP dP dP 88Y888P' `88888P' dP dP dP dP `8888P88
88 .88
dP d8888P
******************************************************************************/
#ifndef _CPARTICLE_SYSTEM_TASK_H
#define _CPARTICLE_SYSTEM_TASK_H
#include "../Common/IGUIEnabledComputeTask.h"
#include "CTriMesh.h"
#include "CGLTexture.h"
#include <string>
//! A4 / T1 Particle system
/*!
Note that this task does not implement a CPU reference result, all simulation is
running on the GPU. The methods related to the evaluation of the correctness of the
kernel are therefore meaningless (not implemented).
*/
class CParticleSystemTask : public IGUIEnabledComputeTask
{
public:
CParticleSystemTask(
const std::string& CollisionMeshPath,
unsigned int NParticles,
size_t LocalWorkSize[3]);
virtual ~CParticleSystemTask();
// IComputeTask
virtual bool InitResources(cl_device_id Device, cl_context Context);
virtual void ReleaseResources();
virtual void ComputeGPU(cl_context Context, cl_command_queue CommandQueue, size_t LocalWorkSize[3]);
// Not implemented!
virtual void ComputeCPU() {};
virtual bool ValidateResults() {return false;};
// IGUIEnabledComputeTask
virtual void Render();
virtual void OnKeyboard(int Key, int Action);
virtual void OnMouse(int Button, int State);
virtual void OnMouseMove(int X, int Y);
virtual void OnIdle(double Time, float ElapsedTime);
virtual void OnWindowResized(int Width, int Height);
protected:
void Scan(cl_context Context, cl_command_queue CommandQueue, size_t LocalWorkSize[3]);
void Integrate(cl_context Context, cl_command_queue CommandQueue, size_t LocalWorkSize[3], float dT);
void Reorganize(cl_context Context, cl_command_queue CommandQueue, size_t LocalWorkSize[3]);
protected:
unsigned int m_nParticles = 0;
unsigned int m_nTriangles = 0;
unsigned int m_volumeRes[3];
size_t m_LocalWorkSize[3];
std::string m_CollisionMeshPath;
CTriMesh* m_pMesh = nullptr;
// OpenCL memory objects
// arrays for particle data
cl_mem m_clPosLife[2] /*= { nullptr, nullptr }*/;
cl_mem m_clVelMass[2] /*= { nullptr, nullptr }*/;
cl_mem m_clAlive = nullptr;
cl_mem m_clTriangleSoup = nullptr;
cl_mem m_clRank = nullptr;
cl_mem m_clVolTex3D = nullptr;
cl_mem m_clPingArray = nullptr;
cl_mem m_clPongArray = nullptr;
// arrays for each level of the work-efficient scan
unsigned int m_nLevels = 0;
cl_mem *m_clLevelArrays = nullptr;
// OpenCL program and kernels
cl_sampler m_LinearSampler = nullptr;
cl_program m_PSystemProgram = nullptr;
cl_kernel m_IntegrateKernel = nullptr;
cl_kernel m_ClearKernel = nullptr;
cl_kernel m_ReorganizeKernel = nullptr;
cl_program m_ScanProgram = nullptr;
cl_kernel m_ScanKernel = nullptr;
cl_kernel m_ScanAddKernel = nullptr;
cl_kernel m_ScanNaiveKernel = nullptr;
// OpenGL variables
//these will be used as VBOs
GLuint m_glPosLife[2] /*{ 0, 0 }*/;
//these will be used as TBOs
GLuint m_glVelMass[2] /*= { 0, 0 }*/;
GLuint m_glVolTex3D = 0;
//texture objects (like the SRV in DirectX) for the TBOs
GLuint m_glTexVelMass[2] /*= { 0, 0 }*/;
GLhandleARB m_VSParticles = 0;
GLhandleARB m_PSParticles = 0;
GLhandleARB m_ProgRenderParticles = 0;
GLhandleARB m_VSMesh = 0;
GLhandleARB m_PSMesh = 0;
GLhandleARB m_ProgRenderMesh = 0;
GLuint m_glForceLines = 0;
GLhandleARB m_VSForceField = 0;
GLhandleARB m_PSForceField = 0;
GLhandleARB m_ProgRenderForceField = 0;
bool m_KeyboardMask[255] /*= { false }*/;
bool m_ShowForceField = false;
// mouse
int m_Buttons = 0;
int m_PrevX = 0;
int m_PrevY = 0;
//for camera handling
float m_RotateX = 0.0f;
float m_RotateY = 0.0f;
float m_TranslateZ = 0.0f;
};
#endif // _CPARTICLE_SYSTEM_TASK_H
#include "CTriMesh.h"
#define MAX_STR 255
#include <iostream>
#include <fstream>
#include <string.h>
using namespace hlsl;
////////////////////////////////////////////////////////////////////////////////////////////////////////
// CTriMesh
CTriMesh::CTriMesh()
{
//m_ModelMatrix = identity<float, 4, 4>();
}
CTriMesh::~CTriMesh()
{
ReleaseGLResources();
}
unsigned int CTriMesh::AddVertex(unsigned int Hash, Vertex* pVertex)
{
//try to find the vertex in the cache
bool found = false;
unsigned int index = 0;
if(m_VertexLoadCache.size() > Hash)
{
CacheEntry* pEntry = m_VertexLoadCache[Hash];
while(pEntry != NULL)
{
Vertex* pCacheVertex = &m_Vertices[ pEntry->Index ];
if(0 == memcmp(pVertex, pCacheVertex, sizeof(Vertex)))
{
found = true;
index = pEntry->Index;
break;
}
pEntry = pEntry->pNext;
}
}
//if the vertex was not found in the cache
if(!found)
{
index = (unsigned int)(m_Vertices.size());
m_Vertices.push_back(*pVertex);
CacheEntry* pNewEntry = new CacheEntry();
pNewEntry->Index = index;
pNewEntry->pNext = NULL;
//grow the cache if needed
while(m_VertexLoadCache.size() <= Hash)
{
m_VertexLoadCache.push_back(NULL);
}
CacheEntry* pCurrEntry = m_VertexLoadCache[Hash];
if(pCurrEntry == NULL)
{
//this is the head element
m_VertexLoadCache[Hash] = pNewEntry;
}
else
{
//find the tail
while(pCurrEntry->pNext != NULL)
pCurrEntry = pCurrEntry->pNext;
pCurrEntry->pNext = pNewEntry;
}
}
return index;
}
void CTriMesh::DeleteCache()
{
for(size_t iEntry = 0; iEntry < m_VertexLoadCache.size(); iEntry++)
{
CacheEntry* pEntry = m_VertexLoadCache[ iEntry ];
while(pEntry != NULL)
{
CacheEntry* pNextEntry = pEntry->pNext;
delete pEntry;
pEntry = pNextEntry;
}
}
m_VertexLoadCache.clear();
}
CTriMesh* CTriMesh::LoadFromObj(const std::string& Path, const float4x4 &M)
{
//temporary storage for the parsed data
std::vector<float3> positions;
std::vector<float3> normals;
std::vector<float2> texcoords;
//file input
char strMatFileName[MAX_STR];
char strCommand[MAX_STR];
std::ifstream inFile(Path);
if(!inFile)
{
std::cout<<"File not found: "<<Path;
return NULL;
}
CTriMesh* pNewMesh = new CTriMesh();
//parse the file
#ifdef _MSC_VER
#pragma warning(disable: 4127)
while(true)
#pragma warning(default: 4127)
#else
while(true)
#endif
{
inFile>>strCommand;
if(!inFile)
break;
if(0 == strcmp( strCommand, "#" ))
{
//comment
}
else if(0 == strcmp( strCommand, "v" ))
{
//vertex position
float x, y, z;
inFile>>x>>y>>z;
float4 vertex = mul(float4(x, y, z, 1.f), M);
positions.push_back(vertex.xyz);
}
else if(0 == strcmp( strCommand, "vt" ))
{
//vertex texcoord
float u, v;
inFile>>u>>v;
texcoords.push_back( float2(u, v) );
}
else if(0 == strcmp( strCommand, "vn" ))
{
//vertex normal
float x, y, z;
inFile>>x>>y>>z;
float4 normal = normalize(mul(float4(x, y, z, 0.f), M));
normals.push_back( normal.xyz );
}
else if(0 == strcmp( strCommand, "f" ))
{
//face
//NOTE: the OBJ format uses 1-based arrays
unsigned int iPos, iTex, iNorm;
Vertex CurrVertex;
Face currFace;
for(unsigned int iVertex = 0; iVertex < 3; iVertex++)
{
memset(&CurrVertex, 0, sizeof(CurrVertex));
inFile>>iPos;
CurrVertex.Pos = positions[iPos - 1];
if( '/' == inFile.peek())
{
inFile.ignore();
if('/' != inFile.peek())
{
//optional texture coordinate
inFile>>iTex;
CurrVertex.Tex = texcoords[iTex - 1];
}
if('/' == inFile.peek())
{
inFile.ignore();
//optional vertex normal
inFile>>iNorm;
CurrVertex.Norm = normals[iNorm - 1];
}
}
//add this vertex to the vertex buffer, but avoid duplicates
unsigned int index = pNewMesh->AddVertex(iPos, &CurrVertex);
currFace.Verts[iVertex] = index;
}
pNewMesh->m_Faces.push_back(currFace);
}
else if(0 == strcmp(strCommand, "mtllib"))
{
//material library
inFile>>strMatFileName;
}
inFile.ignore( 1000, '\n' );
}
pNewMesh->DeleteCache();
return pNewMesh;
}
CTriMesh* CTriMesh::CreatePlane(unsigned int nVertsX, unsigned int nVertsY)
{
if(nVertsX < 2 || nVertsY < 2)
{
std::cout<<"Invalid plane resolution"<<std::endl;
return 0;
}
CTriMesh* pNewMesh = new CTriMesh();
//vertex data
unsigned int xSegments = nVertsX - 1;
unsigned int ySegments = nVertsY - 1;
float deltaX = 1.0f / xSegments;
float deltaY = 1.0f / ySegments;
for(unsigned int y = 0; y < nVertsY; y++)
for(unsigned int x = 0; x < nVertsX; x++)
{
Vertex vert;
vert.Pos = float3(deltaX * x - 0.5f, 0.6f, -deltaY * y);
vert.Norm = float3(0, 0, 1.0f);
vert.Tex = float2(deltaX * x, deltaY * y);
pNewMesh->m_Vertices.push_back(vert);
}
//create indices
for(unsigned int x = 0; x < xSegments; x++)
for(unsigned int y = 0; y < ySegments; y++)
{
Face A;
A.Verts[0] = y * nVertsX + x;
A.Verts[2] = A.Verts[0] + 1;
A.Verts[1] = A.Verts[0] + nVertsX;
Face B;
B.Verts[0] = A.Verts[1];
B.Verts[2] = A.Verts[2];
B.Verts[1] = B.Verts[2] + nVertsX;
pNewMesh->m_Faces.push_back(A);
pNewMesh->m_Faces.push_back(B);
}
return pNewMesh;
}
bool CTriMesh::CreateGLResources()
{
ReleaseGLResources();
//Vertex* pVertices = new Vertex[m_Vertices.size()];
//for(size_t iVert = 0; iVert < m_Vertices.size(); iVert++)
//{
// pVertices[iVert] = m_Vertices[iVert];
//}
float4* pVertices = new float4[m_Vertices.size()];
float4* pNormals = new float4[m_Vertices.size()];
float2* pTexCoords = new float2[m_Vertices.size()];
for(size_t iVert = 0; iVert < m_Vertices.size(); iVert++)
{
pVertices[iVert] = float4(m_Vertices[iVert].Pos, 1.0f);
pNormals[iVert] = float4(m_Vertices[iVert].Norm, 0.0f);
pTexCoords[iVert] = m_Vertices[iVert].Tex;
}
glGenBuffers(1, &m_glVertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, m_glVertexBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(float4) * m_Vertices.size(), pVertices, GL_DYNAMIC_DRAW);
V_RETURN_OGL_ERROR();
glGenBuffers(1, &m_glNormalBuffer);
glBindBuffer(GL_ARRAY_BUFFER, m_glNormalBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(float4) * m_Vertices.size(), pNormals, GL_DYNAMIC_DRAW);
V_RETURN_OGL_ERROR();
glGenBuffers(1, &m_glTexCoordBuffer);
glBindBuffer(GL_ARRAY_BUFFER, m_glTexCoordBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(float2) * m_Vertices.size(), pTexCoords, GL_DYNAMIC_DRAW);
V_RETURN_OGL_ERROR();
delete [] pVertices;
delete [] pNormals;
delete [] pTexCoords;
glGenBuffers(1, &m_glIndexBuffer);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_glIndexBuffer);
unsigned int* pIndices = new unsigned int[m_Faces.size() * 3];
for(size_t i = 0; i < m_Faces.size(); i++)
{
pIndices[3 * i] = m_Faces[i].Verts[0];
pIndices[3 * i + 1] = m_Faces[i].Verts[1];
pIndices[3 * i + 2] = m_Faces[i].Verts[2];
}
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * 3 * m_Faces.size(), pIndices, GL_STATIC_DRAW);
V_RETURN_OGL_ERROR();
delete [] pIndices;
return true;
}
void CTriMesh::ReleaseGLResources()
{
SAFE_RELEASE_GL_BUFFER(m_glVertexBuffer);
CHECK_FOR_OGL_ERROR();
SAFE_RELEASE_GL_BUFFER(m_glNormalBuffer);
CHECK_FOR_OGL_ERROR();
SAFE_RELEASE_GL_BUFFER(m_glTexCoordBuffer);
CHECK_FOR_OGL_ERROR();
SAFE_RELEASE_GL_BUFFER(m_glIndexBuffer);
CHECK_FOR_OGL_ERROR();
}
void CTriMesh::DrawGL(GLenum mode)
{
glEnable(GL_TEXTURE_2D);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
CHECK_FOR_OGL_ERROR();
glBindBuffer(GL_ARRAY_BUFFER, m_glVertexBuffer);
glVertexPointer(3, GL_FLOAT, sizeof(float4), 0);
glBindBuffer(GL_ARRAY_BUFFER, m_glNormalBuffer);
glNormalPointer(GL_FLOAT, sizeof(float4), (char*)0);
glBindBuffer(GL_ARRAY_BUFFER, m_glTexCoordBuffer);
glClientActiveTexture(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(float2), (char*)0);
CHECK_FOR_OGL_ERROR();
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_glIndexBuffer);
CHECK_FOR_OGL_ERROR();
glDrawElements(mode, m_Faces.size() * 3, GL_UNSIGNED_INT, 0);
CHECK_FOR_OGL_ERROR();
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
CHECK_FOR_OGL_ERROR();
}
GLuint CTriMesh::GetVertexBuffer() const
{
return m_glVertexBuffer;
}
GLuint CTriMesh::GetNormalBuffer() const
{
return m_glNormalBuffer;
}
//void CTriMesh::SetTransform(const float4x4& Matrix)
//{
// m_ModelMatrix = Matrix;
//}
//
//const float4x4* CTriMesh::GetTransform() const
//{
// return &m_ModelMatrix;
//}
void CTriMesh::GetTriangleSoup(float** ppPositionBuffer, unsigned int* pNumTriangles)
{
*ppPositionBuffer = new float[4 * 3 * m_Faces.size()];
float4* pPositionBuffer = (float4*)*ppPositionBuffer;
*pNumTriangles = m_Faces.size();
//transform all the vertices to world space before copying
for(unsigned int iFace = 0; iFace < m_Faces.size(); iFace++)
{
for(unsigned int i = 0; i < 3; i++)
{
float4 mpos(m_Vertices[ m_Faces[iFace].Verts[i] ].Pos, 1.0f);
//float4 wpos = mul(mpos, m_ModelMatrix);
*pPositionBuffer = mpos;
pPositionBuffer++;
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
This class handles triangle meshes.
*/
#ifndef CTRIMESH_H
#define CTRIMESH_H
#ifdef min // these macros are defined under windows, but collide with our math utility
# undef min
#endif
#ifdef max
# undef max
#endif
#include "HLSLEx.h"
#include "GLCommon.h"
#include <vector>
#include <string>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class CTriMesh
{
protected:
//only for loading from obj
struct CacheEntry
{
unsigned int Index;
CacheEntry* pNext;
};
struct Vertex
{
hlsl::float3 Pos;
hlsl::float3 Norm;
hlsl::float2 Tex;
};
struct Face
{
unsigned int Verts[3];
};
//CPU data
std::vector<CacheEntry*>m_VertexLoadCache;
std::vector<Vertex> m_Vertices;
std::vector<Face> m_Faces;
//transformation
//float4x4 m_ModelMatrix;
//rendering data on the GPU
GLuint m_glVertexBuffer = 0;
GLuint m_glNormalBuffer = 0;
GLuint m_glTexCoordBuffer = 0;
GLuint m_glIndexBuffer = 0;
//adds a new vertex to the vertex buffer and returns its index.
unsigned int AddVertex(unsigned int Hash, Vertex* pVertex);
void DeleteCache();
public:
CTriMesh();
~CTriMesh();
static CTriMesh* LoadFromObj(const std::string& Path, const hlsl::float4x4 &M);
//create a unit plane with a given resolution
static CTriMesh* CreatePlane(unsigned int nVertsX, unsigned int nVertsY);
bool CreateGLResources();
void ReleaseGLResources();
GLuint GetVertexBuffer() const;
GLuint GetNormalBuffer() const;
//void SetTransform(const float4x4& Matrix);
//const float4x4* GetTransform() const;
//returns the WORLD positions of the triangle in the buffer
//the float array will contain triplets of vertices, each vertex having 4 floats as world coordinate (float4)
void GetTriangleSoup(float** ppPositionBuffer, unsigned int* pNumVertices);
//renders the triangles using the current OpenGL program
void DrawGL(GLenum mode);
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#endif
/******************************************************************************
GPU Computing / GPGPU Praktikum source code.
******************************************************************************/
#include "GLCommon.h"
#include <iostream>
using namespace std;
/////////////////////////////////////////////////////////////////////////////////////////////////////
//OpenGL utility functions
void LoadProgram(const char* Path, char** pSource, size_t* SourceSize)
{
FILE* pFileStream = NULL;
// open the OpenCL source code file
#ifdef _WIN32 // Windows version
if(fopen_s(&pFileStream, Path, "rb") != 0)
{
cout<<"File not found: "<<Path;
return;
}
#else // Linux version
pFileStream = fopen(Path, "rb");
if(pFileStream == 0)
{
cout<<"File not found: "<<Path;
return;
}
#endif
//get the length of the source code
fseek(pFileStream, 0, SEEK_END);
*SourceSize = ftell(pFileStream);
fseek(pFileStream, 0, SEEK_SET);
*pSource = new char[*SourceSize + 1];
fread(*pSource, *SourceSize, 1, pFileStream);
fclose(pFileStream);
(*pSource)[*SourceSize] = '\0';
}
bool CreateShaderFromFile(const char* Path, GLhandleARB shader)
{
char* sourceCode = NULL;
size_t sourceLength;
LoadProgram(Path, &sourceCode, &sourceLength);
if(sourceCode == NULL)
return false;
glShaderSourceARB(shader, 1, (const char**)&sourceCode, NULL);
if(!CompileGLSLShader(shader))
{
delete [] sourceCode;
cout<<"Failed to compile shader: "<<Path<<endl;
return false;
}
delete [] sourceCode;
return true;
}
bool CompileGLSLShader(GLhandleARB obj)
{
GLint success;
glCompileShaderARB(obj);
glGetShaderiv(obj, GL_COMPILE_STATUS, &success);
if(success == GL_FALSE)
{
int infoLogLength = 0;
char infoLog[1024];
cout<<"There were compile errors:"<<endl;
glGetShaderInfoLog(obj, 1024, &infoLogLength, infoLog);
if(infoLogLength > 0)
cout<<infoLog<<endl;
return false;
}
return true;
}
bool LinkGLSLProgram(GLhandleARB program)
{
GLint success;
glLinkProgramARB(program);
CHECK_FOR_OGL_ERROR();
glGetProgramiv(program, GL_LINK_STATUS, &success);
CHECK_FOR_OGL_ERROR();
if(success == GL_FALSE)
{
int infoLogLength = 0;
char infoLog[1024];
cout<<"There were link errors:"<<endl;
glGetProgramInfoLog(program, 1024, &infoLogLength, infoLog);
if(infoLogLength > 0)
cout<<infoLog<<endl;
return false;
}
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
/******************************************************************************
.88888. 888888ba dP dP
d8' `88 88 `8b 88 88
88 a88aaaa8P' 88 88
88 YP88 88 88 88
Y8. .88 88 Y8. .8P
`88888' dP `Y88888P'
a88888b. dP oo
d8' `88 88
88 .d8888b. 88d8b.d8b. 88d888b. dP dP d8888P dP 88d888b. .d8888b.
88 88' `88 88'`88'`88 88' `88 88 88 88 88 88' `88 88' `88
Y8. .88 88. .88 88 88 88 88. .88 88. .88 88 88 88 88 88. .88
Y88888P' `88888P' dP dP dP 88Y888P' `88888P' dP dP dP dP `8888P88
88 .88
dP d8888P
******************************************************************************/
#ifndef GL_COMMON_H
#define GL_COMMON_H
// for using OpenGL
#include "GL/glew.h"
#include <GLFW/glfw3.h>
/////////////////////////////////////////////////////////////////////////////////////////////////////
//OpenGL utility functions
bool CreateShaderFromFile(const char* Path, GLhandleARB shader);
//utility function which attempts to compile a GLSL shader, then prints the error messages on failure
bool CompileGLSLShader(GLhandleARB shader);
bool LinkGLSLProgram(GLhandleARB program);
#define SAFE_RELEASE_GL_BUFFER(obj) do {if(obj){ glDeleteBuffers(1, &obj); obj = 0; }} while(0)
#define SAFE_RELEASE_GL_SHADER(obj) do {if(obj){ glDeleteShader(obj); obj = 0; }} while(0)
#define SAFE_RELEASE_GL_PROGRAM(obj) do {if(obj){ glDeleteProgram(obj); obj = 0; }} while(0)
#define CHECK_FOR_OGL_ERROR() \
do { \
GLenum err; \
err = glGetError(); \
if (err != GL_NO_ERROR) \
{ \
if (err == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) \
{ \
fprintf(stderr, "%s(%d) glError: Invalid Framebuffer Operation\n",\
__FILE__, __LINE__); \
} \
else \
{ \
fprintf(stderr, "%s(%d) glError: %s\n", \
__FILE__, __LINE__, gluErrorString(err)); \
} \
} \
} while(0)
#define V_RETURN_OGL_ERROR() \
do { \
GLenum err; \
err = glGetError(); \
if (err != GL_NO_ERROR) \
{ \
if (err == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) \
{ \
fprintf(stderr, "%s(%d) glError: Invalid Framebuffer Operation\n",\
__FILE__, __LINE__); \
} \
else \
{ \
fprintf(stderr, "%s(%d) glError: %s\n", \
__FILE__, __LINE__, gluErrorString(err)); \
} \
return false; \
} \
} while(0)
#endif // GL_COMMON_H
#include "HLSL.h"
#ifdef _MSC_VER
#include <math.h>
float hlsl::acos(float x) {
return ::acosf(x);
}
float hlsl::asin(float x) {
return ::asinf(x);
}
float hlsl::atan2(float y, float x) {
return ::atan2f(y, x);
}
float hlsl::cos(float x) {
return ::cos(x);
}
float hlsl::sin(float x) {
return ::sin(x);
}
float hlsl::sqrt(float x) {
return ::sqrt(x);
}
float hlsl::tan(float x) {
return ::tan(x);
}
#endif
float4 cross3(float4 a, float4 b){
float4 c;
c.x = a.y * b.z - b.y * a.z;
c.y = a.z * b.x - b.z * a.x;
c.z = a.x * b.y - b.x * a.y;
c.w = 0.f;
return c;
}
float dot3(float4 a, float4 b){
return a.x*b.x + a.y*b.y + a.z*b.z;
}
#define EPSILON 0.001f
// This function expects two points defining a ray (x0 and x1)
// and three vertices stored in v1, v2, and v3 (the last component is not used)
// it returns true if an intersection is found and sets the isectT and isectN
// with the intersection ray parameter and the normal at the intersection point.
bool LineTriangleIntersection( float4 x0, float4 x1,
float4 v1, float4 v2, float4 v3,
float *isectT, float4 *isectN){
float4 dir = x1 - x0;
dir.w = 0.f;
float4 e1 = v2 - v1;
float4 e2 = v3 - v1;
e1.w = 0.f;
e2.w = 0.f;
float4 s1 = cross3(dir, e2);
float divisor = dot3(s1, e1);
if (divisor == 0.f)
return false;
float invDivisor = 1.f / divisor;
// Compute first barycentric coordinate
float4 d = x0 - v1;
float b1 = dot3(d, s1) * invDivisor;
if (b1 < -EPSILON || b1 > 1.f + EPSILON)
return false;
// Compute second barycentric coordinate
float4 s2 = cross3(d, e1);
float b2 = dot3(dir, s2) * invDivisor;
if (b2 < -EPSILON || b1 + b2 > 1.f + EPSILON)
return false;
// Compute _t_ to intersection point
float t = dot3(e2, s2) * invDivisor;
if (t < -EPSILON || t > 1.f + EPSILON)
return false;
// Store the closest found intersection so far
*isectT = t;
*isectN = cross3(e1, e2);
*isectN = normalize(*isectN);
return true;
}
bool CheckCollisions( float4 x0, float4 x1,
__global float4 *gTriangleSoup,
__local float4* lTriangleCache, // The cache should hold as many vertices as the number of threads (therefore the number of triangles is nThreads/3)
uint nTriangles,
float *t,
float4 *n){
// ADD YOUR CODE HERE
// Each vertex of a triangle is stored as a float4, the last component is not used.
// gTriangleSoup contains vertices of triangles in the following layout:
// --------------------------------------------------------------
// | t0_v0 | t0_v1 | t0_v2 | t1_v0 | t1_v1 | t1_v2 | t2_v0 | ...
// --------------------------------------------------------------
// First check collisions loading the triangles from the global memory.
// Iterate over all triangles, load the vertices and call the LineTriangleIntersection test
// for each triangle to find the closest intersection.
// Notice that each thread has to read vertices of all triangles.
// As an optimization you should implement caching of the triangles in the local memory.
// The cache should hold as many float4 vertices as the number of threads.
// In other words, each thread loads (at most) *one vertex*.
// Consequently, the number of triangles in the cache will be nThreads/4.
// Notice that if there are many triangles (e.g. CubeMonkey.obj), not all
// triangles can fit into the cache at once.
// Therefore, you have to load the triangles in chunks, until you process them all.
// The caching implementation should roughly follow this scheme:
//uint nProcessed = 0;
//while (nProcessed < nTriangles) {
// Load a 'k' triangles in to the cache
// Iterate over the triangles in the cache and test for the intersection
// nProcessed += k;
//}
return false;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This is the integration kernel. Implement the missing functionality
//
// Input data:
// gAlive - Field of flag indicating whether the particle with that index is alive (!= 0) or dead (0). You will have to modify this
// gForceField - 3D texture with the force field
// sampler - 3D texture sampler for the force field (see usage below)
// nParticles - Number of input particles
// nTriangles - Number of triangles in the scene (for collision detection)
// lTriangleCache - Local memory cache to be used during collision detection for the triangles
// gTriangleSoup - The triangles in the scene (layout see the description of CheckCollisions())
// gPosLife - Position (xyz) and remaining lifetime (w) of a particle
// gVelMass - Velocity vector (xyz) and the mass (w) of a particle
// dT - The timestep for the integration (the has to be subtracted from the remaining lifetime of each particle)
//
// Output data:
// gAlive - Updated alive flags
// gPosLife - Updated position and lifetime
// gVelMass - Updated position and mass
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
__kernel void Integrate(__global uint *gAlive,
__read_only image3d_t gForceField,
sampler_t sampler,
uint nParticles,
uint nTriangles,
__local float4 *lTriangleCache,
__global float4 *gTriangleSoup,
__global float4 *gPosLife,
__global float4 *gVelMass,
float dT
) {
float4 gAccel = (float4)(0.f, -9.81f, 0.f, 0.f);
// Verlet Velocity Integration
float4 x0 = gPosLife[get_global_id(0)];
float4 v0 = gVelMass[get_global_id(0)];
float mass = v0.w;
float life = x0.w;
float4 lookUp = x0;
lookUp.w = 0.f;
float4 F0 = read_imagef(gForceField, sampler, lookUp);
// ADD YOUR CODE HERE (INSTEAD OF THE LINES BELOW)
// to finish the implementation of the Verlet Velocity Integration
x0.y = 0.2f * sin(x0.w * 5.f) + 0.3f;
x0.w -= dT;
gPosLife[get_global_id(0)] = x0;
// Check for collisions and correct the position and velocity of the particle if it collides with a triangle
// - Don't forget to offset the particles from the surface a little bit, otherwise they might get stuck in it.
// - Dampen the velocity (e.g. by a factor of 0.7) to simulate dissipation of the energy.
// Kill the particle if its life is < 0.0 by setting the corresponding flag in gAlive to 0.
// Independently of the status of the particle, possibly create a new one.
// For instance, if the particle gets too fast (or too high, or passes through some region), it is split into two...
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
__kernel void Clear(__global float4* gPosLife, __global float4* gVelMass) {
uint GID = get_global_id(0);
gPosLife[GID] = 0.f;
gVelMass[GID] = 0.f;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
__kernel void Reorganize( __global uint* gAlive, __global uint* gRank,
__global float4* gPosLifeIn, __global float4* gVelMassIn,
__global float4* gPosLifeOut, __global float4* gVelMassOut) {
// Re-order the particles according to the gRank obtained from the parallel prefix sum
// ADD YOUR CODE HERE
}
\ No newline at end of file
//********************************************************
// GPU Computing only!
// (If you are doing the smaller course, ignore this file)
//********************************************************
// Add your previous parallel prefix sum code here
__kernel void Scan(__global uint* inArray, __global uint* outArray, __global uint* higherLevelArray, __local uint* localBlock)
{}
__kernel void ScanAdd(__global uint* higherLevelArray, __global uint* outArray, __local uint* localBlock)
{}
__kernel void ScanNaive(const __global uint* inArray, __global uint* outArray, uint N, uint offset)
{}
#define DAMPING 0.02f
#define G_ACCEL (float4)(0.f, -9.81f, 0.f, 0.f)
#define WEIGHT_ORTHO 0.138f
#define WEIGHT_DIAG 0.097f
#define WEIGHT_ORTHO_2 0.069f
#define WEIGHT_DIAG_2 0.048f
#define ROOT_OF_2 1.4142135f
#define DOUBLE_ROOT_OF_2 2.8284271f
///////////////////////////////////////////////////////////////////////////////
// The integration kernel
// Input data:
// width and height - the dimensions of the particle grid
// d_pos - the most recent position of the cloth particle while...
// d_prevPos - ...contains the position from the previous iteration.
// elapsedTime - contains the elapsed time since the previous invocation of the kernel,
// prevElapsedTime - contains the previous time step.
// simulationTime - contains the time elapsed since the start of the simulation (useful for wind)
// All time values are given in seconds.
//
// Output data:
// d_prevPos - Input data from d_pos must be copied to this array
// d_pos - Updated positions
///////////////////////////////////////////////////////////////////////////////
__kernel void Integrate(unsigned int width,
unsigned int height,
__global float4* d_pos,
__global float4* d_prevPos,
float elapsedTime,
float prevElapsedTime,
float simulationTime) {
// Make sure the work-item does not map outside the cloth
if(get_global_id(0) >= width || get_global_id(1) >= height)
return;
unsigned int particleID = get_global_id(0) + get_global_id(1) * width;
// This is just to keep every 8th particle of the first row attached to the bar
if(particleID > width-1 || ( particleID & ( 7 )) != 0){
// ADD YOUR CODE HERE!
// Read the positions
// Compute the new one position using the Verlet position integration, taking into account gravity and wind
// Move the value from d_pos into d_prevPos and store the new one in d_pos
}
}
///////////////////////////////////////////////////////////////////////////////
// Input data:
// pos1 and pos2 - The positions of two particles
// restDistance - the distance between the given particles at rest
//
// Return data:
// correction vector for particle 1
///////////////////////////////////////////////////////////////////////////////
float4 SatisfyConstraint(float4 pos1,
float4 pos2,
float restDistance){
float4 toNeighbor = pos2 - pos1;
return (toNeighbor - normalize(toNeighbor) * restDistance);
}
///////////////////////////////////////////////////////////////////////////////
// Input data:
// width and height - the dimensions of the particle grid
// restDistance - the distance between two orthogonally neighboring particles at rest
// d_posIn - the input positions
//
// Output data:
// d_posOut - new positions must be written here
///////////////////////////////////////////////////////////////////////////////
#define TILE_X 16
#define TILE_Y 16
#define HALOSIZE 2
__kernel __attribute__((reqd_work_group_size(TILE_X, TILE_Y, 1)))
__kernel void SatisfyConstraints(unsigned int width,
unsigned int height,
float restDistance,
__global float4* d_posOut,
__global float4 const * d_posIn){
if(get_global_id(0) >= width || get_global_id(1) >= height)
return;
// ADD YOUR CODE HERE!
// Satisfy all the constraints (structural, shear, and bend).
// You can use weights defined at the beginning of this file.
// A ping-pong scheme is needed here, so read the values from d_posIn and store the results in d_posOut
// Hint: you should use the SatisfyConstraint helper function in the following manner:
//SatisfyConstraint(pos, neighborpos, restDistance) * WEIGHT_XXX
}
///////////////////////////////////////////////////////////////////////////////
// Input data:
// width and height - the dimensions of the particle grid
// d_pos - the input positions
// spherePos - The position of the sphere (xyz)
// sphereRad - The radius of the sphere
//
// Output data:
// d_pos - The updated positions
///////////////////////////////////////////////////////////////////////////////
__kernel void CheckCollisions(unsigned int width,
unsigned int height,
__global float4* d_pos,
float4 spherePos,
float sphereRad){
// ADD YOUR CODE HERE!
// Find whether the particle is inside the sphere.
// If so, push it outside.
}
///////////////////////////////////////////////////////////////////////////////
// There is no need to change this function!
///////////////////////////////////////////////////////////////////////////////
float4 CalcTriangleNormal( float4 p1, float4 p2, float4 p3) {
float4 v1 = p2-p1;
float4 v2 = p3-p1;
return cross( v1, v2);
}
///////////////////////////////////////////////////////////////////////////////
// There is no need to change this kernel!
///////////////////////////////////////////////////////////////////////////////
__kernel void ComputeNormals(unsigned int width,
unsigned int height,
__global float4* d_pos,
__global float4* d_normal){
int particleID = get_global_id(0) + get_global_id(1) * width;
float4 normal = (float4)( 0.0f, 0.0f, 0.0f, 0.0f);
int minX, maxX, minY, maxY, cntX, cntY;
minX = max( (int)(0), (int)(get_global_id(0)-1));
maxX = min( (int)(width-1), (int)(get_global_id(0)+1));
minY = max( (int)(0), (int)(get_global_id(1)-1));
maxY = min( (int)(height-1), (int)(get_global_id(1)+1));
for( cntX = minX; cntX < maxX; ++cntX) {
for( cntY = minY; cntY < maxY; ++cntY) {
normal += normalize( CalcTriangleNormal(
d_pos[(cntX+1)+width*(cntY)],
d_pos[(cntX)+width*(cntY)],
d_pos[(cntX)+width*(cntY+1)]));
normal += normalize( CalcTriangleNormal(
d_pos[(cntX+1)+width*(cntY+1)],
d_pos[(cntX+1)+width*(cntY)],
d_pos[(cntX)+width*(cntY+1)]));
}
}
d_normal[particleID] = normalize( normal);
}
void main()
{
gl_FragColor = gl_Color;//vec4(1.0f, 0, 0, 0.3f);
}
\ No newline at end of file
uniform sampler3D texForceField;
void main() {
vec4 v = vec4(gl_Vertex);
vec3 lookUp = v.xyz;
vec4 force = texture3D(texForceField, lookUp);
gl_FrontColor = vec4(v.w, 1 - v.w, 0, 0.5);
//gl_FrontColor *= length(force.xyz) * 0.01f;
if(v.w == 0.0)
{
v.w = 1.0;
v.xyz += 0.0015 * force.xyz;
}
gl_Position = gl_ModelViewProjectionMatrix * v;
}
#
# glew-cmake project
#
# Provides a cmake build system for the GLEW project, and offers binary releases
# across several different platforms and compilers
#
# We require a minimum of V2.8 of CMake
cmake_minimum_required( VERSION 2.8 )
message(${CMAKE_CURRENT_BINARY_DIR})
set(LIBBASENAME "glew")
# Project name (Will determine the output name)
project( ${LIBBASENAME})
# Setup the version numbers for the release we're currently at
set( LIB_VMAJOR 1 )
set( LIB_VMINOR 10 )
set( LIB_VPATCH 0 )
option(GLEW_BUILD_INFO "Build the GLEW info programs" OFF)
# Determine the pointer size to know what architecture we're targetting
if( ${CMAKE_SIZEOF_VOID_P} EQUAL 4 )
set( PSIZE 32 )
elseif( ${CMAKE_SIZEOF_VOID_P} EQUAL 8 )
set( PSIZE 64 )
else()
message( FATAL_ERROR "Data width could not be determined!" )
endif()
if( CMAKE_BUILD_TYPE STREQUAL "Debug" )
set( DBG "-debug" )
endif()
if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
set( COMPILER "-gcc" )
elseif( MSVC )
set( COMPILER "-vc" )
# With MSVC we should normally generate a more specific compiler version
# which includes information about the revision of the compiler. This
# revision information lets us know which of the MSVCR libraries is depended
# upon in our build.
#
# However, GLEW doesn't use the CRT so there is no need to differentiate
# between different CRT versions.
endif()
if( WIN32 )
list( APPEND MLIBS opengl32 )
list( APPEND MLIBS gdi32 )
list( APPEND MLIBS user32 )
list( APPEND MLIBS kernel32 )
endif()
if( COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_C_FLAGS_RELEASE "-Wall -O2" )
set( CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g" )
elseif( MSVC )
set( CMAKE_C_FLAGS_RELEASE "/O2" )
set( CMAKE_C_FLAGS_DEBUG "/Zi /O0" )
endif()
# Build the library name from the project and databus width (pointer size)
set( LIBNAME "${LIBBASENAME}${PSIZE}" )
# Include directories for all targets
include_directories( "${PROJECT_SOURCE_DIR}/include" )
# C Pre-processor definitions for all targets
add_definitions( -DGLEW_BUILD )
add_definitions( -DGLEW_NO_GLU )
# The shared GLEW library
add_library( ${LIBNAME} SHARED
"${PROJECT_SOURCE_DIR}/src/glew.c"
"${PROJECT_SOURCE_DIR}/build/glew.rc" )
set(GLEW_LIBRARY ${LIBNAME} PARENT_SCOPE)
target_link_libraries( ${LIBNAME}
${MLIBS} )
# The static GLEW library
add_library( ${LIBNAME}s STATIC
"${PROJECT_SOURCE_DIR}/src/glew.c"
"${PROJECT_SOURCE_DIR}/build/glew.rc" )
set_target_properties( ${LIBNAME}s PROPERTIES
COMPILE_DEFINITIONS "GLEW_STATIC" )
# The mx shared GLEW library
add_library( ${LIBNAME}mx SHARED
"${PROJECT_SOURCE_DIR}/src/glew.c"
"${PROJECT_SOURCE_DIR}/build/glew.rc" )
set_target_properties( ${LIBNAME}mx PROPERTIES
COMPILE_DEFINITIONS "GLEW_MX" )
target_link_libraries( ${LIBNAME}mx
${MLIBS} )
# The mx static GLEW library
add_library( ${LIBNAME}mxs STATIC
"${PROJECT_SOURCE_DIR}/src/glew.c"
"${PROJECT_SOURCE_DIR}/build/glew.rc" )
set_target_properties( ${LIBNAME}mxs PROPERTIES
COMPILE_DEFINTIIONS "GLEW_STATIC GLEW_MX" )
install( TARGETS ${LIBNAME} ${LIBNAME}s
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib )
install( TARGETS ${LIBNAME}mx ${LIBNAME}mxs
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT mx )
if (GLEW_BUILD_INFO)
# The glewinfo application
add_executable( glewinfo
"${PROJECT_SOURCE_DIR}/src/glewinfo.c"
"${PROJECT_SOURCE_DIR}/build/glewinfo.rc" )
# Build the glewinfo application statically linked
target_link_libraries( glewinfo
${LIBNAME}s
${MLIBS} )
install( TARGETS glewinfo
RUNTIME DESTINATION bin )
# The visualinfo application
add_executable( visualinfo
"${PROJECT_SOURCE_DIR}/src/visualinfo.c"
"${PROJECT_SOURCE_DIR}/build/glewinfo.rc" )
target_link_libraries( visualinfo
${LIBNAME}s
${MLIBS} )
install( TARGETS visualinfo
RUNTIME DESTINATION bin )
endif()
# Header files need to be included in the install!
install( DIRECTORY ${PROJECT_SOURCE_DIR}/include/GL
DESTINATION include )
# --- CPack Packaging
# For packaging, select the package types we want to create
list( APPEND CPACK_GENERATOR TBZ2 )
list( APPEND CPACK_GENERATOR ZIP )
set( CPACK_PACKAGE_VERSION_MAJOR ${LIB_VMAJOR} )
set( CPACK_PACKAGE_VERSION_MINOR ${LIB_VMINOR} )
set( CPACK_PACKAGE_VERSION_PATCH ${LIB_VPATCH} )
set( CPACK_PACKAGE_NAME "${LIBBASENAME}${COMPILER}${DBG}" )
# Do not move this include, it must be included after ALL CPack variables have
# been defined
include( CPack )
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Mesa 3-D graphics library
Version: 7.0
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) 2007 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
See doc/index.html for more information.
If you downloaded the tarball from the GLEW website, you just need to:
Unix:
make
Windows:
use the project file in build/vc6/
If you wish to build GLEW from scratch (update the extension data from
the net or add your own extension information), you need a Unix
environment (including wget, perl, and GNU make). The extension data
is regenerated from the top level source directory with:
make extensions
Major:
- add support for windows mini-client drivers
- add windows installer (msi)
- separate build of static and shared object files (for mingw and
cygwin)
- start designing GLEW 2.0
Minor:
- make auto scripts work with text mode cygwin mounts
- add support for all SUN, MTX, and OML extensions
- make auto/Makefile more robust against auto/core/*~ mistakes
- web poll on separating glew, glxew and wglew
#include <windows.h>
#ifdef GLEW_MX
# ifdef GLEW_STATIC
# ifdef _DEBUG
# define FILENAME "glew32mxsd.dll"
# else
# define FILENAME "glew32mxs.dll"
# endif
# else
# ifdef _DEBUG
# define FILENAME "glew32mxd.dll"
# else
# define FILENAME "glew32mx.dll"
# endif
# endif
#else
# ifdef GLEW_STATIC
# ifdef _DEBUG
# define FILENAME "glew32sd.dll"
# else
# define FILENAME "glew32s.dll"
# endif
# else
# ifdef _DEBUG
# define FILENAME "glew32d.dll"
# else
# define FILENAME "glew32.dll"
# endif
# endif
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 10, 0, 0
PRODUCTVERSION 1, 10, 0, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
#ifdef GLEW_STATIC
FILETYPE VFT_STATIC_LIB
#else
FILETYPE VFT_DLL
#endif
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian"
" org>\r\nCopyright (C) 2002, Lev Povalahev\r\nAll rights reserved"
".\r\n\r\nRedistribution and use in source and binary forms, with"
" or without \r\nmodification, are permitted provided that the "
"following conditions are met:\r\n\r\n* Redistributions of source "
"code must retain the above copyright notice, \r\n this list of "
"conditions and the following disclaimer.\r\n* Redistributions in "
"binary form must reproduce the above copyright notice, \r\n this "
"list of conditions and the following disclaimer in the "
"documentation \r\n and/or other materials provided with the "
"distribution.\r\n* The name of the author may be used to endorse "
"or promote products \r\n derived from this software without "
"specific prior written permission.\r\n\r\nTHIS SOFTWARE IS "
"PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED "
"TO, THE \r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR "
"A PARTICULAR PURPOSE\r\nARE DISCLAIMED. IN NO EVENT SHALL THE "
"COPYRIGHT OWNER OR CONTRIBUTORS BE \r\nLIABLE FOR ANY DIRECT, "
"INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\nCONSEQUENTIAL "
"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR "
"BUSINESS\r\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF "
"LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT "
"(INCLUDING NEGLIGENCE OR OTHERWISE)\r\nARISING IN ANY WAY OUT OF "
"THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\nTHE POSSIBILITY "
"OF SUCH DAMAGE.\r\n\r\n\r\nMesa 3-D graphics library\r\n\r\n"
"Version: 7.0\r\n\r\nCopyright (C) 1999-2007 Brian Paul All "
"Rights Reserved.\r\n\r\nPermission is hereby granted, free of "
"charge, to any person obtaining a\r\ncopy of this software and "
"associated documentation files (the ''Software''),\r\nto deal in "
"the Software without restriction, including without limitation\r\n"
"the rights to use, copy, modify, merge, publish, distribute, "
"sublicense,\r\nand/or sell copies of the Software, and to permit "
"persons to whom the\r\nSoftware is furnished to do so, subject to "
"the following conditions:\r\n\r\nThe above copyright notice and "
"this permission notice shall be included\r\nin all copies or "
"substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS "
"PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\nOR "
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
"MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND "
"NONINFRINGEMENT. IN NO EVENT SHALL\r\nBRIAN PAUL BE LIABLE FOR "
"ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r\nAN ACTION OF "
"CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\n"
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE "
"SOFTWARE.\r\n\r\n\r\nCopyright (c) 2007 The Khronos Group Inc."
"\r\n\r\nPermission is hereby granted, free of charge, to any "
"person obtaining a\r\ncopy of this software and/or associated "
"documentation files (the\r\n''Materials''), to deal in the "
"Materials without restriction, including\r\nwithout limitation "
"the rights to use, copy, modify, merge, publish,\r\ndistribute, "
"sublicense, and/or sell copies of the Materials, and to\r\npermit "
"persons to whom the Materials are furnished to do so, subject to"
"\r\nthe following conditions:\r\n\r\nThe above copyright notice "
"and this permission notice shall be included\r\nin all copies or "
"substantial portions of the Materials.\r\n\r\nTHE MATERIALS ARE "
"PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR "
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n"
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND "
"NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT "
"HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, "
"WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING "
"FROM, OUT OF OR IN CONNECTION WITH THE\r\nMATERIALS OR THE USE OR "
"OTHER DEALINGS IN THE MATERIALS.\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "The OpenGL Extension Wrangler Library\0"
VALUE "FileVersion", "1,10,0,0\0"
VALUE "InternalName", "GLEW\0"
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The OpenGL Extension Wrangler Library\0"
VALUE "ProductVersion", "1,10,0,0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#include <windows.h>
#ifdef GLEW_MX
# ifdef _DEBUG
# define FILENAME "glewinfo-mxd.exe"
# else
# define FILENAME "glewinfo-mx.exe"
# endif
#else
# ifdef _DEBUG
# define FILENAME "glewinfod.exe"
# else
# define FILENAME "glewinfo.exe"
# endif
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 10, 0, 0
PRODUCTVERSION 1, 10, 0, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian "
"org>\r\nCopyright (C) 2002, Lev Povalahev\r\nAll rights reserved."
"\r\n \r\nRedistribution and use in source and binary forms, with "
"or without \r\nmodification, are permitted provided that the "
"following conditions are met:\r\n\r\n* Redistributions of source "
"code must retain the above copyright notice, \r\n this list of "
"conditions and the following disclaimer.\r\n* Redistributions in "
"binary form must reproduce the above copyright notice, \r\n this "
"list of conditions and the following disclaimer in the "
"documentation \r\n and/or other materials provided with the "
"distribution.\r\n* The name of the author may be used to endorse "
"or promote products \r\n derived from this software without "
"specific prior written permission.\r\n\r\nTHIS SOFTWARE IS "
"PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED "
"TO, THE \r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR "
"A PARTICULAR PURPOSE\r\nARE DISCLAIMED. IN NO EVENT SHALL THE "
"COPYRIGHT OWNER OR CONTRIBUTORS BE \r\nLIABLE FOR ANY DIRECT, "
"INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\nCONSEQUENTIAL "
"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR "
"BUSINESS\r\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF "
"LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT "
"(INCLUDING NEGLIGENCE OR OTHERWISE)\r\nARISING IN ANY WAY OUT OF "
"THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\nTHE POSSIBILITY "
"OF SUCH DAMAGE.\r\n\r\nLicense Applicability. Except to the "
"extent portions of this file are\r\nmade subject to an "
"alternative license as permitted in the SGI Free\r\nSoftware "
"License B, Version 1.1 (the 'License'), the contents of this\r\n"
"file are subject only to the provisions of the License. You may "
"not use\r\nthis file except in compliance with the License. You "
"may obtain a copy\r\nof the License at Silicon Graphics, Inc., "
"attn: Legal Services, 1600\r\nAmphitheatre Parkway, Mountain "
"View, CA 94043-1351, or at:\r\n\r\nhttp://oss.sgi.com/projects/"
"FreeB\r\n\r\nNote that, as provided in the License, the Software "
"is distributed on an\r\n'AS IS' basis, with ALL EXPRESS AND "
"IMPLIED WARRANTIES AND CONDITIONS\r\nDISCLAIMED, INCLUDING, "
"WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND\r\nCONDITIONS OF "
"MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A\r\n"
"PARTICULAR PURPOSE, AND NON-INFRINGEMENT.\r\n\r\nOriginal Code. "
"The Original Code is: OpenGL Sample Implementation,\r\nVersion "
"1.2.1, released January 26, 2000, developed by Silicon Graphics,"
"\r\nInc. The Original Code is Copyright (c) 1991-2000 Silicon "
"Graphics, Inc.\r\nCopyright in any portions created by third "
"parties is as indicated\r\nelsewhere herein. All Rights Reserved."
"\r\n\r\nAdditional Notice Provisions: This software was created "
"using the\r\nOpenGL(R) version 1.2.1 Sample Implementation "
"published by SGI, but has\r\nnot been independently verified as "
"being compliant with the OpenGL(R)\r\nversion 1.2.1 "
"Specification.\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Utility for verifying extension entry points\0"
VALUE "FileVersion", "1,10,0,0\0"
VALUE "InternalName", "glewinfo\0"
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The OpenGL Extension Wrangler Library\0"
VALUE "ProductVersion", "1,10,0,0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<INCLUDE_DIR>../../include</INCLUDE_DIR>
<LIB_DIR>../../lib</LIB_DIR>
<BIN_DIR>../../bin</BIN_DIR>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(INCLUDE_DIR)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="INCLUDE_DIR">
<Value>$(INCLUDE_DIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="LIB_DIR">
<Value>$(LIB_DIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="BIN_DIR">
<Value>$(BIN_DIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
</ItemGroup>
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew_shared", "glew_shared.vcxproj", "{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew_static", "glew_static.vcxproj", "{664E6F0D-6784-4760-9565-D54F8EB1EDF4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glewinfo", "glewinfo.vcxproj", "{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visualinfo", "visualinfo.vcxproj", "{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug MX|Win32 = Debug MX|Win32
Debug MX|x64 = Debug MX|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release MX|Win32 = Release MX|Win32
Release MX|x64 = Release MX|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug MX|Win32.ActiveCfg = Debug MX|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug MX|Win32.Build.0 = Debug MX|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug MX|x64.ActiveCfg = Debug MX|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug MX|x64.Build.0 = Debug MX|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug|Win32.ActiveCfg = Debug|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug|Win32.Build.0 = Debug|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug|x64.ActiveCfg = Debug|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Debug|x64.Build.0 = Debug|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release MX|Win32.ActiveCfg = Release MX|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release MX|Win32.Build.0 = Release MX|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release MX|x64.ActiveCfg = Release MX|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release MX|x64.Build.0 = Release MX|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release|Win32.ActiveCfg = Release|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release|Win32.Build.0 = Release|Win32
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release|x64.ActiveCfg = Release|x64
{55AE3D72-7DE6-F19F-AEF2-9AE8CA26CF3D}.Release|x64.Build.0 = Release|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug MX|Win32.ActiveCfg = Debug MX|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug MX|Win32.Build.0 = Debug MX|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug MX|x64.ActiveCfg = Debug MX|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug MX|x64.Build.0 = Debug MX|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|Win32.ActiveCfg = Debug|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|Win32.Build.0 = Debug|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x64.ActiveCfg = Debug|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x64.Build.0 = Debug|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release MX|Win32.ActiveCfg = Release MX|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release MX|Win32.Build.0 = Release MX|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release MX|x64.ActiveCfg = Release MX|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release MX|x64.Build.0 = Release MX|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|Win32.ActiveCfg = Release|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|Win32.Build.0 = Release|Win32
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x64.ActiveCfg = Release|x64
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x64.Build.0 = Release|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug MX|Win32.ActiveCfg = Debug MX|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug MX|Win32.Build.0 = Debug MX|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug MX|x64.ActiveCfg = Debug MX|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug MX|x64.Build.0 = Debug MX|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug|Win32.ActiveCfg = Debug|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug|Win32.Build.0 = Debug|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug|x64.ActiveCfg = Debug|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Debug|x64.Build.0 = Debug|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release MX|Win32.ActiveCfg = Release MX|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release MX|Win32.Build.0 = Release MX|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release MX|x64.ActiveCfg = Release MX|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release MX|x64.Build.0 = Release MX|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release|Win32.ActiveCfg = Release|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release|Win32.Build.0 = Release|Win32
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release|x64.ActiveCfg = Release|x64
{8EFB5DCB-C0C4-1670-5938-A0E0F1A1C5EA}.Release|x64.Build.0 = Release|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug MX|Win32.ActiveCfg = Debug MX|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug MX|Win32.Build.0 = Debug MX|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug MX|x64.ActiveCfg = Debug MX|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug MX|x64.Build.0 = Debug MX|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug|Win32.ActiveCfg = Debug|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug|Win32.Build.0 = Debug|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug|x64.ActiveCfg = Debug|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Debug|x64.Build.0 = Debug|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release MX|Win32.ActiveCfg = Release MX|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release MX|Win32.Build.0 = Release MX|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release MX|x64.ActiveCfg = Release MX|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release MX|x64.Build.0 = Release MX|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release|Win32.ActiveCfg = Release|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release|Win32.Build.0 = Release|Win32
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release|x64.ActiveCfg = Release|x64
{79AA8443-86F4-649A-0BEB-0CB5E51B7D7E}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "glew_shared"=.\glew_shared.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "glew_static"=.\glew_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "glewinfo"=.\glewinfo.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name glew_static
End Project Dependency
}}}
###############################################################################
Project: "visualinfo"=.\visualinfo.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name glew_static
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
# Microsoft Developer Studio Project File - Name="glew_shared" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=glew_shared - Win32 Debug MX
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "glew_shared.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "glew_shared.mak" CFG="glew_shared - Win32 Debug MX"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "glew_shared - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "glew_shared - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "glew_shared - Win32 Debug MX" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "glew_shared - Win32 Release MX" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "glew_shared - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "shared/release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLEW_EXPORTS" /YX /FD /c
# ADD CPP /nologo /W3 /O2 /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_BUILD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 opengl32.lib /nologo /dll /pdb:none /machine:I386 /out:"../../bin/glew32.dll" /ignore:4089
# ADD LINK32 /base:0x62AA0000
!ELSEIF "$(CFG)" == "glew_shared - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "shared/debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLEW_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_BUILD" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 opengl32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"../../bin/glew32d.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
# ADD LINK32 /base:0x62AA0000
!ELSEIF "$(CFG)" == "glew_shared - Win32 Debug MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "glew_shared___Win32_Debug_MX"
# PROP BASE Intermediate_Dir "glew_shared___Win32_Debug_MX"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "shared/debug-mx"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_BUILD" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_MX" /D "GLEW_BUILD" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "GLEW_MX"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 opengl32.lib /nologo /dll /incremental:no /pdb:"../../lib/glew32d.pdb" /debug /machine:I386 /out:"../../lib/glew32d.dll" /implib:"../../lib/glew32d.lib" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 opengl32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"../../bin/glew32mxd.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
# ADD LINK32 /base:0x62AA0000
!ELSEIF "$(CFG)" == "glew_shared - Win32 Release MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "glew_shared___Win32_Release_MX"
# PROP BASE Intermediate_Dir "glew_shared___Win32_Release_MX"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "shared/release-mx"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O2 /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_BUILD" /YX /FD /c
# ADD CPP /nologo /W3 /O2 /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_MX" /D "GLEW_BUILD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "GLEW_MX"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 opengl32.lib /nologo /dll /pdb:none /machine:I386 /out:"../../lib/glew32.dll" /implib:"../../lib/glew32.lib" /ignore:4089
# ADD LINK32 opengl32.lib /nologo /dll /pdb:none /machine:I386 /out:"../../bin/glew32mx.dll" /ignore:4089
# ADD LINK32 /base:0x62AA0000
!ENDIF
# Begin Target
# Name "glew_shared - Win32 Release"
# Name "glew_shared - Win32 Debug"
# Name "glew_shared - Win32 Debug MX"
# Name "glew_shared - Win32 Release MX"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\glew.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\include\GL\glew.h
# End Source File
# Begin Source File
SOURCE=..\..\include\GL\wglew.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\glew.rc
# End Source File
# End Group
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="glew_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=glew_static - Win32 Debug MX
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "glew_static.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "glew_static.mak" CFG="glew_static - Win32 Debug MX"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "glew_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "glew_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "glew_static - Win32 Debug MX" (based on "Win32 (x86) Static Library")
!MESSAGE "glew_static - Win32 Release MX" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "glew_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "static/release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "GLEW_STATIC"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"../../lib/glew32s.lib"
!ELSEIF "$(CFG)" == "glew_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "static/debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "GLEW_STATIC"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"../../lib/glew32sd.lib"
!ELSEIF "$(CFG)" == "glew_static - Win32 Debug MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "glew_static___Win32_Debug_MX"
# PROP BASE Intermediate_Dir "glew_static___Win32_Debug_MX"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "static/debug-mx"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_MX" /D "GLEW_STATIC" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "GLEW_MX" /d "GLEW_STATIC"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"../../lib/glew32sd.lib"
# ADD LIB32 /nologo /out:"../../lib/glew32mxsd.lib"
!ELSEIF "$(CFG)" == "glew_static - Win32 Release MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "glew_static___Win32_Release_MX"
# PROP BASE Intermediate_Dir "glew_static___Win32_Release_MX"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "static/release-mx"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRALEAN" /D "GLEW_MX" /D "GLEW_STATIC" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "GLEW_MX" /d "GLEW_STATIC"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"../../lib/glew32s.lib"
# ADD LIB32 /nologo /out:"../../lib/glew32mxs.lib"
!ENDIF
# Begin Target
# Name "glew_static - Win32 Release"
# Name "glew_static - Win32 Debug"
# Name "glew_static - Win32 Debug MX"
# Name "glew_static - Win32 Release MX"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\glew.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\include\GL\glew.h
# End Source File
# Begin Source File
SOURCE=..\..\include\GL\wglew.h
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\glew.rc
# End Source File
# End Group
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="glewinfo" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=glewinfo - Win32 Debug MX
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "glewinfo.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "glewinfo.mak" CFG="glewinfo - Win32 Debug MX"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "glewinfo - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "glewinfo - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "glewinfo - Win32 Debug MX" (based on "Win32 (x86) Console Application")
!MESSAGE "glewinfo - Win32 Release MX" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "glewinfo - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ../../lib/glew32s.lib opengl32.lib gdi32.lib user32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "glewinfo - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ../../lib/glew32sd.lib opengl32.lib gdi32.lib user32.lib /nologo /subsystem:console /incremental:no /pdb:"static/debug/glewinfod.pdb" /debug /machine:I386 /out:"../../bin/glewinfod.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "glewinfo - Win32 Debug MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "glewinfo___Win32_Debug_MX"
# PROP BASE Intermediate_Dir "glewinfo___Win32_Debug_MX"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/debug-mx"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "GLEW_STATIC" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "GLEW_MX" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "GLEW_MX"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 ../../lib/glew32sd.lib opengl32.lib gdi32.lib user32.lib /nologo /subsystem:console /incremental:no /pdb:"static/debug/glewinfod.pdb" /debug /machine:I386 /out:"../../bin/glewinfod.exe" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 ../../lib/glew32mxsd.lib opengl32.lib gdi32.lib user32.lib /nologo /subsystem:console /incremental:no /pdb:"static/debug/glewinfod.pdb" /debug /machine:I386 /out:"../../bin/glewinfo-mxd.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "glewinfo - Win32 Release MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "glewinfo___Win32_Release_MX"
# PROP BASE Intermediate_Dir "glewinfo___Win32_Release_MX"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/release-mx"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_MX" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "GLEW_MX"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 ../../lib/glew32s.lib opengl32.lib gdi32.lib user32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ../../lib/glew32mxs.lib opengl32.lib gdi32.lib user32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/glewinfo-mx.exe"
!ENDIF
# Begin Target
# Name "glewinfo - Win32 Release"
# Name "glewinfo - Win32 Debug"
# Name "glewinfo - Win32 Debug MX"
# Name "glewinfo - Win32 Release MX"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\glewinfo.c
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\glewinfo.rc
# End Source File
# End Group
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="visualinfo" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=visualinfo - Win32 Debug MX
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "visualinfo.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "visualinfo.mak" CFG="visualinfo - Win32 Debug MX"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "visualinfo - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "visualinfo - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "visualinfo - Win32 Debug MX" (based on "Win32 (x86) Console Application")
!MESSAGE "visualinfo - Win32 Release MX" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "visualinfo - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ../../lib/glew32s.lib glu32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "visualinfo - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ../../lib/glew32sd.lib glu32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"static/debug/visualinfod.pdb" /debug /machine:I386 /out:"../../bin/visualinfod.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "visualinfo - Win32 Debug MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "visualinfo___Win32_Debug_MX"
# PROP BASE Intermediate_Dir "visualinfo___Win32_Debug_MX"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/debug-mx"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "GLEW_STATIC" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "GLEW_MX" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "GLEW_MX"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 ../../lib/glew32sd.lib glu32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"static/debug/visualinfod.pdb" /debug /machine:I386 /out:"../../bin/visualinfod.exe" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 ../../lib/glew32mxsd.lib glu32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"static/debug/visualinfod.pdb" /debug /machine:I386 /out:"../../bin/visualinfo-mxd.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "visualinfo - Win32 Release MX"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "visualinfo___Win32_Release_MX"
# PROP BASE Intermediate_Dir "visualinfo___Win32_Release_MX"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "static/release-mx"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_STATIC" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "WIN32_MEAN_AND_LEAN" /D "VC_EXTRALEAN" /D "GLEW_MX" /D "GLEW_STATIC" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "GLEW_MX"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 ../../lib/glew32s.lib glu32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ../../lib/glew32mxs.lib glu32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/visualinfo-mx.exe"
!ENDIF
# Begin Target
# Name "visualinfo - Win32 Release"
# Name "visualinfo - Win32 Debug"
# Name "visualinfo - Win32 Debug MX"
# Name "visualinfo - Win32 Release MX"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\visualinfo.c
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\visualinfo.rc
# End Source File
# End Group
# End Target
# End Project
#include <windows.h>
#ifdef GLEW_MX
# ifdef _DEBUG
# define FILENAME "visualinfo-mxd.exe"
# else
# define FILENAME "visualinfo-mx.exe"
# endif
#else
# ifdef _DEBUG
# define FILENAME "visualinfod.exe"
# else
# define FILENAME "visualinfo.exe"
# endif
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 10, 0, 0
PRODUCTVERSION 1, 10, 0, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian "
"org>\r\nCopyright (C) 2002, Lev Povalahev\r\nAll rights reserved."
"\r\n \r\nRedistribution and use in source and binary forms, with "
"or without \r\nmodification, are permitted provided that the "
"following conditions are met:\r\n\r\n* Redistributions of source "
"code must retain the above copyright notice, \r\n this list of "
"conditions and the following disclaimer.\r\n* Redistributions in "
"binary form must reproduce the above copyright notice, \r\n this "
"list of conditions and the following disclaimer in the "
"documentation \r\n and/or other materials provided with the "
"distribution.\r\n* The name of the author may be used to endorse "
"or promote products \r\n derived from this software without "
"specific prior written permission.\r\n\r\nTHIS SOFTWARE IS "
"PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED "
"TO, THE \r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR "
"A PARTICULAR PURPOSE\r\nARE DISCLAIMED. IN NO EVENT SHALL THE "
"COPYRIGHT OWNER OR CONTRIBUTORS BE \r\nLIABLE FOR ANY DIRECT, "
"INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\nCONSEQUENTIAL "
"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR "
"BUSINESS\r\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF "
"LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT "
"(INCLUDING NEGLIGENCE OR OTHERWISE)\r\nARISING IN ANY WAY OUT OF "
"THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\nTHE POSSIBILITY "
"OF SUCH DAMAGE.\r\n\r\nLicense Applicability. Except to the "
"extent portions of this file are\r\nmade subject to an "
"alternative license as permitted in the SGI Free\r\nSoftware "
"License B, Version 1.1 (the 'License'), the contents of this\r\n"
"file are subject only to the provisions of the License. You may "
"not use\r\nthis file except in compliance with the License. You "
"may obtain a copy\r\nof the License at Silicon Graphics, Inc., "
"attn: Legal Services, 1600\r\nAmphitheatre Parkway, Mountain "
"View, CA 94043-1351, or at:\r\n\r\nhttp://oss.sgi.com/projects/"
"FreeB\r\n\r\nNote that, as provided in the License, the Software "
"is distributed on an\r\n'AS IS' basis, with ALL EXPRESS AND "
"IMPLIED WARRANTIES AND CONDITIONS\r\nDISCLAIMED, INCLUDING, "
"WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND\r\nCONDITIONS OF "
"MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A\r\n"
"PARTICULAR PURPOSE, AND NON-INFRINGEMENT.\r\n\r\nOriginal Code. "
"The Original Code is: OpenGL Sample Implementation,\r\nVersion "
"1.2.1, released January 26, 2000, developed by Silicon Graphics,"
"\r\nInc. The Original Code is Copyright (c) 1991-2000 Silicon "
"Graphics, Inc.\r\nCopyright in any portions created by third "
"parties is as indicated\r\nelsewhere herein. All Rights Reserved."
"\r\n\r\nAdditional Notice Provisions: This software was created "
"using the\r\nOpenGL(R) version 1.2.1 Sample Implementation "
"published by SGI, but has\r\nnot been independently verified as "
"being compliant with the OpenGL(R)\r\nversion 1.2.1 "
"Specification.\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Utility for listing pixelformat capabilities\0"
VALUE "FileVersion", "1,10,0,0\0"
VALUE "InternalName", "visualinfo\0"
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The OpenGL Extension Wrangler Library\0"
VALUE "ProductVersion", "1,10,0,0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
NAME = glew32
GLEW_DEST = /usr
BINDIR = /usr/bin
LIBDIR = /usr/lib/mingw
INCDIR = /usr/include/mingw/GL
# use gcc for linking, with ld it does not work
CC := gcc -mno-cygwin
LD := gcc -mno-cygwin
LN :=
CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L$(LIBDIR)
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX = .exe
LIB.SONAME = lib$(NAME).dll
LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
LIB.SHARED = $(NAME).dll
LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
LIB.SONAME.MX = lib$(NAME)mx.dll
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib
LIB.SHARED.MX = $(NAME)mx.dll
LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)
NAME = GLEW
GLEW_DEST ?= /usr
# use gcc for linking, with ld it does not work
CC := cc
LD := cc
LN :=
LDFLAGS.EXTRA =
LIBDIR = $(GLEW_DEST)/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX = .exe
LIB.SONAME = cyg$(NAME)-$(GLEW_MAJOR)-$(GLEW_MINOR).dll
LIB.DEVLNK = lib$(NAME).dll.a
LIB.SHARED = cyg$(NAME)-$(GLEW_MAJOR)-$(GLEW_MINOR).dll
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -Wl,--out-implib,lib/$(LIB.DEVLNK)
LIB.SONAME.MX = cyg$(NAME)mx-$(GLEW_MAJOR)-$(GLEW_MINOR).dll
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a
LIB.SHARED.MX = cyg$(NAME)mx-$(GLEW_MAJOR)-$(GLEW_MINOR).dll
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = cc
CFLAGS.EXTRA = -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
LDFLAGS.EXTRA =
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lXmu -lXi -lGL -lXext -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib
LIB.SHARED = lib$(NAME).$(SO_VERSION).dylib
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
LIB.SONAME.MX = lib$(NAME)mx.$(SO_MAJOR).dylib
LIB.DEVLNK.MX = lib$(NAME)mx.dylib
LIB.SHARED.MX = lib$(NAME)mx.$(SO_VERSION).dylib
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED.MX) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
NAME = $(GLEW_NAME)
CC = cc
LD = cc
CFLAGS.EXTRA = -arch ppc -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
LDFLAGS.EXTRA = -arch ppc
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lXmu -lXi -lGL -lXext -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib
LIB.SHARED = lib$(NAME).$(SO_VERSION).dylib
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
LIB.SONAME.MX = lib$(NAME)mx.$(SO_MAJOR).dylib
LIB.DEVLNK.MX = lib$(NAME)mx.dylib
LIB.SHARED.MX = lib$(NAME)mx.$(SO_VERSION).dylib
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED.MX) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
NAME = $(GLEW_NAME)
CC = cc
LD = cc
CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
LDFLAGS.EXTRA = -arch x86_64
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lXmu -lXi -lGL -lXext -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib
LIB.SHARED = lib$(NAME).$(SO_VERSION).dylib
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
LIB.SONAME.MX = lib$(NAME)mx.$(SO_MAJOR).dylib
LIB.DEVLNK.MX = lib$(NAME)mx.dylib
LIB.SHARED.MX = lib$(NAME)mx.$(SO_VERSION).dylib
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED.MX) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
# For cross-compiling from Linux to Windows x86 using mingw32
# http://www.mingw.org/
#
# $ make SYSTEM=fedora-mingw32
#
include config/Makefile.linux-mingw32
CC := i686-pc-mingw32-gcc
LD := i686-pc-mingw32-ld
LDFLAGS.GL += -L/usr/i686-pc-mingw32/sys-root/mingw/lib
NAME = $(GLEW_NAME)
CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R6/include
NAME = GLEW
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -soname $(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = cc
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -Wl,-soname=$(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = ld
ABI = -64# -n32
CC += $(ABI)
LD += $(ABI)
LDFLAGS.EXTRA =
LDFLAGS.GL = -lGL -lXext -lX11
NAME = GLEW
WARN = -fullwarn -woff 1110,1498
POPT = -O2 -OPT:Olimit=0
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -soname $(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = cc
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -Wl,-soname $(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -Wl,-soname $(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = cc
M_ARCH ?= $(shell uname -m)
ARCH64 = false
ifeq (x86_64,${M_ARCH})
ARCH64 = true
endif
ifeq (ppc64,${M_ARCH})
ARCH64 = true
endif
ifeq (${ARCH64},true)
LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
LIBDIR = $(GLEW_DEST)/lib64
else
LDFLAGS.EXTRA = -L/usr/X11R6/lib -L/usr/lib
LIBDIR = $(GLEW_DEST)/lib
endif
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -Wl,-soname=$(LIB.SONAME.MX)
# For cross-compiling from Linux to Windows x86 using mingw32
# http://www.mingw.org/
#
# $ make SYSTEM=linux-mingw32
#
NAME := glew32
CC := i586-mingw32msvc-gcc
LD := i586-mingw32msvc-ld
LN :=
STRIP :=
CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX = .exe
LIB.SONAME = lib$(NAME).dll
LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
LIB.SHARED = $(NAME).dll
LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
LIB.SONAME.MX = lib$(NAME)mx.dll
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib
LIB.SHARED.MX = $(NAME)mx.dll
LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX)
# For cross-compiling from Linux to Windows amd64 using mingw32
# http://www.mingw.org/
#
# $ make SYSTEM=linux-mingw64
#
NAME := glew32
CC := amd64-mingw32msvc-gcc
LD := amd64-mingw32msvc-ld
LN :=
STRIP :=
CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX = .exe
LIB.SONAME = lib$(NAME).dll
LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
LIB.SHARED = $(NAME).dll
LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
LIB.SONAME.MX = lib$(NAME)mx.dll
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib
LIB.SHARED.MX = $(NAME)mx.dll
LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX)
NAME = glew32
# use gcc for linking, with ld it does not work
CC := gcc
LD := gcc
LN :=
CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L/mingw/lib
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX = .exe
LIB.SONAME = lib$(NAME).dll
LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
LIB.SHARED = $(NAME).dll
LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
LIB.SONAME.MX = lib$(NAME)mx.dll
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib
LIB.SHARED.MX = $(NAME)mx.dll
LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO)
LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)
NAME = $(REGAL_NAME)
M_PREFIX = i686
M_NAME ?= $(shell uname -s)
ifeq (Linux,${M_NAME})
M_PREFIX = i686
endif
CC = $(M_PREFIX)-nacl-gcc
CXX = $(M_PREFIX)-nacl-g++
LD = $(M_PREFIX)-nacl-ld
STRIP ?=
EXT.DYNAMIC = so
LDFLAGS.EXTRA =
LIBDIR =
CFLAGS.EXTRA += -fPIC
CFLAGS.EXTRA += -m32
LDFLAGS.EXTRA += -melf_nacl
LDFLAGS.GL =
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = -shared
WARN = -Wall -W -Wno-unused-parameter
POPT = -O2
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME.MX)
NAME = $(REGAL_NAME)
M_PREFIX = i686
M_NAME ?= $(shell uname -s)
ifeq (Linux,${M_NAME})
M_PREFIX = i686
endif
CC = $(M_PREFIX)-nacl-gcc
CXX = $(M_PREFIX)-nacl-g++
LD = $(M_PREFIX)-nacl-ld
STRIP ?=
EXT.DYNAMIC = so
LDFLAGS.EXTRA =
LIBDIR =
CFLAGS.EXTRA += -fPIC
CFLAGS.EXTRA += -m64
LDFLAGS.EXTRA += -melf64_nacl
LDFLAGS.GL =
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = -shared
WARN = -Wall -W -Wno-unused-parameter
POPT = -O2
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R7/lib -R /usr/X11R7/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R7/include -fPIC
NAME = GLEW
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -soname $(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11 -lm
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R6/include
NAME = GLEW
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -soname $(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX)
NAME = $(GLEW_NAME)
CC = cc
LD = ld
CFLAGS.EXTRA = -I/usr/openwin/include
LDFLAGS.SO = -G
LDFLAGS.EXTRA = -L/usr/openwin/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
NAME = GLEW
BIN.SUFFIX =
POPT = -xO2
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
NAME = $(GLEW_NAME)
CC = gcc
LD = ld
CFLAGS.EXTRA = -I/usr/openwin/include
LDFLAGS.SO = -G
LDFLAGS.EXTRA = -L/usr/openwin/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
NAME = GLEW
BIN.SUFFIX =
POPT = -O2
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -Wl,-soname=$(LIB.SONAME.MX)
GLEW_MAJOR = 1
GLEW_MINOR = 10
GLEW_MICRO = 0
GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO)
GLEW_NAME = GLEW
SO_MAJOR = $(GLEW_MAJOR).$(GLEW_MINOR)
SO_VERSION = $(GLEW_VERSION)
cmake -G "CodeBlocks - MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug ..\
cmake -G "CodeBlocks - MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..\
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug ..\
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..\
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: glew
Description: The OpenGL Extension Wrangler library
Version: @version@
Cflags: -I${includedir} @cflags@
Libs: -L${libdir} -l@libname@
Requires: glu
This source diff could not be displayed because it is too large. You can view the blob instead.
SET CWD=%CD%
IF EXIST build_gcc_release goto BUILD_GCC_REL
mkdir build_gcc_release
:BUILD_GCC_REL
cd build_gcc_release
call ../configs/configure-gcc-release.bat
mingw32-make package > build_log.txt 2>&1
cd %CWD%
IF EXIST build_gcc_debug goto BUILD_GCC_DBG
mkdir build_gcc_debug
:BUILD_GCC_DBG
cd build_gcc_debug
call ../configs/configure-gcc-debug.bat
mingw32-make package > build_log.txt 2>&1
cd %CWD%
IF EXIST build_vc_release goto BUILD_VC_REL
mkdir build_vc_release
:BUILD_VC_REL
cd build_vc_release
call ../configs/configure-vc-release.bat
nmake package > build_log.txt 2>&1
cd %CWD%
IF EXIST build_vc_debug goto BUILD_VC_DBG
mkdir build_vc_debug
:BUILD_VC_DBG
cd build_vc_debug
call ../configs/configure-vc-debug.bat
nmake package > build_log.txt 2>&1
cd %CWD%
erase glew-1.10.0-src.zip
bzr export glew-1.10.0-src.zip
erase glew-1.10.0-src.tar.bz2
bzr export glew-1.10.0-src.tar.bz2
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# External junk
.DS_Store
_ReSharper*
*.opensdf
*.sdf
*.dir
*.vcxproj*
*.sln
Win32
Debug
Release
# CMake files
Makefile
CMakeCache.txt
CMakeFiles
cmake_install.cmake
cmake_uninstall.cmake
# Generated files
docs/Doxyfile
docs/html
docs/warnings.txt
src/glfw_config.h
src/glfw3.pc
src/glfwConfig.cmake
src/glfwConfigVersion.cmake
# Compiled binaries
src/libglfw.so
src/libglfw.so.3
src/libglfw.so.3.0
src/libglfw.dylib
src/libglfw.dylib
src/libglfw.3.dylib
src/libglfw.3.0.dylib
src/libglfw3.a
src/glfw3.lib
src/glfw3.dll
src/glfw3dll.lib
src/glfw3dll.a
examples/*.app
examples/*.exe
examples/boing
examples/gears
examples/heightmap
examples/particles
examples/splitview
examples/simple
examples/wave
tests/*.app
tests/*.exe
tests/accuracy
tests/clipboard
tests/cursor
tests/cursoranim
tests/defaults
tests/empty
tests/events
tests/fsaa
tests/gamma
tests/glfwinfo
tests/iconify
tests/joysticks
tests/modes
tests/peter
tests/reopen
tests/sharing
tests/tearing
tests/threads
tests/title
tests/version
tests/windows
# Define the environment for cross compiling from Linux to Win64
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc")
SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++")
SET(CMAKE_RC_COMPILER "amd64-mingw32msvc-windres")
SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib")
# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Define the environment for cross compiling from Linux to Win32
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i586-mingw32msvc-gcc")
SET(CMAKE_CXX_COMPILER "i586-mingw32msvc-g++")
SET(CMAKE_RC_COMPILER "i586-mingw32msvc-windres")
SET(CMAKE_RANLIB "i586-mingw32msvc-ranlib")
# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Define the environment for cross compiling from Linux to Win32
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i686-pc-mingw32-gcc")
SET(CMAKE_CXX_COMPILER "i686-pc-mingw32-g++")
SET(CMAKE_RC_COMPILER "i686-pc-mingw32-windres")
SET(CMAKE_RANLIB "i686-pc-mingw32-ranlib")
#Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/opt/mingw/usr/i686-pc-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment