Commit 3b77e568 authored by Philip Trettner's avatar Philip Trettner

Initial commit

parents
Pipeline #1553 skipped
This diff is collapsed.
--- AntTweakBar license ---
Copyright (C) 2005-2013 Philippe Decaudin
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the
use of this software.
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to
the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is not
required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
AntTweakBar development library
-------------------------------
AntTweakBar is a small and easy-to-use C/C++ library that allows programmers
to quickly add a light and intuitive GUI into OpenGL and DirectX based
graphic programs to interactively tweak parameters.
This package includes the development version of the AntTweakBar library
for Windows, GNU/Linux and OSX, and some program examples (sources + binaries).
For installation and documentation please refer to:
http://anttweakbar.sourceforge.net/doc
This diff is collapsed.
// ---------------------------------------------------------------------------
//
// @file AntPerfTimer.h
// @brief A performance (precision) timer for benchs
// @author Philippe Decaudin
// @license This file is part of the AntTweakBar library.
// For conditions of distribution and use, see License.txt
//
// note: No cpp file is needed, everything is defined in this header
//
// ---------------------------------------------------------------------------
#if !defined ANT_PERF_TIMER_INCLUDED
#define ANT_PERF_TIMER_INCLUDED
#ifndef __cplusplus
# error This is a C++ header
#endif // __cplusplus
#if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#include <tchar.h>
struct PerfTimer
{
inline PerfTimer() { if( !QueryPerformanceFrequency(&Freq) ) MessageBox(NULL, _T("Precision timer not supported"), _T("Problem"), MB_ICONEXCLAMATION); Reset(); }
inline void Reset() { QueryPerformanceCounter(&Start); }
inline double GetTime() { if( QueryPerformanceCounter(&End) ) return ((double)End.QuadPart - (double)Start.QuadPart)/((double)Freq.QuadPart); else return 0; }
protected:
LARGE_INTEGER Start, End, Freq;
};
#else // !_WIN (-> LINUX)
#include <sys/time.h>
#include <unistd.h>
struct PerfTimer
{
inline PerfTimer() { Reset(); }
inline void Reset() { gettimeofday(&Start, &TZ); }
inline double GetTime() { gettimeofday(&End,&TZ);
double t1 = (double)Start.tv_sec + (double)Start.tv_usec/(1000*1000);
double t2 = (double)End.tv_sec + (double)End.tv_usec/(1000*1000);
return t2-t1; }
protected:
struct timeval Start, End;
struct timezone TZ;
};
#endif // _WIN
#endif // ANT_PERF_TIMER_INCLUDED
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
//#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Franais (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
//LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Cursor
//
IDC_CURSOR1 CURSOR "res\\cur00013.cur"
IDC_CURSOR2 CURSOR "res\\cur00000.cur"
IDC_CURSOR3 CURSOR "res\\cur00001.cur"
IDC_CURSOR4 CURSOR "res\\cur00002.cur"
IDC_CURSOR5 CURSOR "res\\cur00003.cur"
IDC_CURSOR6 CURSOR "res\\cur00004.cur"
IDC_CURSOR7 CURSOR "res\\cur00005.cur"
IDC_CURSOR8 CURSOR "res\\cur00006.cur"
IDC_CURSOR9 CURSOR "res\\cur00007.cur"
IDC_CURSOR10 CURSOR "res\\cur00008.cur"
IDC_CURSOR11 CURSOR "res\\cur00009.cur"
IDC_CURSOR12 CURSOR "res\\cur00010.cur"
IDC_CURSOR13 CURSOR "res\\cur00011.cur"
IDC_CURSOR14 CURSOR "res\\cur00012.cur"
#endif // Franais (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{f83ca079-8ea0-4739-a811-1271c1da7b99}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Public Header Files">
<UniqueIdentifier>{9fa95835-d0ac-461f-9e15-970d83af4629}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Private Header Files">
<UniqueIdentifier>{87a5b5f8-eb1d-4589-96fd-f8e516fc15e7}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{d4d938bf-b5f6-43d3-896f-a3fff1885877}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="LoadOGL.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="LoadOGLCore.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwBar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwColors.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwDirect3D10.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwDirect3D11.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwDirect3D9.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventGLFW.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventGLUT.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventSDL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventSDL12.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventSDL13.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventSFML.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwEventWin.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwFonts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwMgr.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwOpenGL.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwOpenGLCore.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwPrecomp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\AntTweakBar.h">
<Filter>Public Header Files</Filter>
</ClInclude>
<ClInclude Include="AntPerfTimer.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="LoadOGL.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="LoadOGLCore.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="MiniGLFW.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="MiniGLUT.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="MiniSDL12.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="MiniSDL13.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="MiniSFML16.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwBar.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwColors.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwDirect3D10.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwDirect3D11.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwDirect3D9.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwFonts.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwGraph.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwMgr.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwOpenGL.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwOpenGLCore.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="TwPrecomp.h">
<Filter>Private Header Files</Filter>
</ClInclude>
<ClInclude Include="res\TwXCursors.h">
<Filter>Private Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="AntTweakBar.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="res\cur00000.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00001.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00002.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00003.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00004.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00005.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00006.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00007.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00008.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00009.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00010.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00011.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00012.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\cur00013.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="res\FontFixed1.pgm">
<Filter>Resource Files</Filter>
</None>
<None Include="res\FontLargeAA.pgm">
<Filter>Resource Files</Filter>
</None>
<None Include="res\FontNormal.pgm">
<Filter>Resource Files</Filter>
</None>
<None Include="FontSmall.pgm">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Text Include="res\FontChars.txt">
<Filter>Resource Files</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="TwDirect3D11.hlsl">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
</Project>
\ No newline at end of file
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AntTweakBar", "AntTweakBar.vcproj", "{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|Win32.ActiveCfg = Debug|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|Win32.Build.0 = Debug|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|x64.ActiveCfg = Debug|x64
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|x64.Build.0 = Debug|x64
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|Win32.ActiveCfg = Release|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|Win32.Build.0 = Release|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|x64.ActiveCfg = Release|x64
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AntTweakBar", "AntTweakBar.vcxproj", "{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|Win32.ActiveCfg = Debug|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|Win32.Build.0 = Debug|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|x64.ActiveCfg = Debug|x64
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Debug|x64.Build.0 = Debug|x64
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|Win32.ActiveCfg = Release|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|Win32.Build.0 = Release|Win32
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|x64.ActiveCfg = Release|x64
{B99E1FA1-C30A-45F2-9D57-9E9C21B2DF42}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
####### Compiler, tools and options
#---- LINUX
SO_EXT = .so
SO_VERSION = 1
AR_EXT = .a
#---- Release
CXXCFG = -O3
LFLAGS =
OUT_DIR = ../lib
#---- Debug
#CXXCFG = -g -D_DEBUG
#LFLAGS =
#OUT_DIR = ../lib/debug
CXX = gcc
CXXFLAGS = $(CXXCFG) -Wall -fPIC -fno-strict-aliasing -D_UNIX -D__PLACEMENT_NEW_INLINE
INCPATH = -I../include -I/usr/local/include -I/usr/X11R6/include -I/usr/include
LINK = gcc
#LIBS = -L/usr/X11R6/lib -L. -lglfw -lGL -lGLU -lX11 -lXxf86vm -lXext -lpthread -lm
#LIBS = -L/usr/X11R6/lib -lGL -lX11 -lXxf86vm -lXext -lpthread -lm
LIBS =
AR = ar cqs
RANLIB =
TAR = tar -cf
GZIP = gzip -9f
COPY = cp -f
COPY_FILE = $(COPY) -p
COPY_DIR = $(COPY) -pR
DEL_FILE = rm -f
SYMLINK = ln -sf
DEL_DIR = rmdir
MOVE = mv
NO_STDERR = 2> /dev/null
####### Files
# name of the application:
TARGET = AntTweakBar
# source files without extension:
SRC_FILES = TwColors.cpp TwFonts.cpp TwOpenGL.cpp TwOpenGLCore.cpp TwBar.cpp TwMgr.cpp TwPrecomp.cpp LoadOGL.cpp LoadOGLCore.cpp TwEventGLFW.c TwEventGLUT.c TwEventSDL.c TwEventSDL12.c TwEventSDL13.c TwEventSFML.cpp TwEventX11.c
# build object list from source files
OBJS_1 = $(SRC_FILES:.c=.o)
OBJS = $(OBJS_1:.cpp=.o)
####### Build rules
#first: depend all
first: all
all: Makefile $(TARGET)
# append dependencies to this Makefile
#depend:
# @echo "==== Make dependencies ====="
# makedepend -Y
# makedepend -a -Y -- $(CXXFLAGS) $(INCPATH) -- $(SRC_FILES) $(NO_STDERR)
$(TARGET): $(OBJS)
@echo "===== Link $@ ====="
$(LINK) $(LFLAGS) -shared -Wl,-soname,lib$(TARGET)$(SO_EXT).$(SO_VERSION) -o $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(OBJS) $(LIBS)
$(SYMLINK) $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(OUT_DIR)/lib$(TARGET)$(SO_EXT).$(SO_VERSION)
$(AR) $(OUT_DIR)/lib$(TARGET)$(AR_EXT) $(OBJS) $(LIBS)
.cpp.o:
@echo "===== Compile $< ====="
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
@echo "===== Compile $< ====="
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
clean:
@echo "===== Clean ====="
-$(DEL_FILE) *.o
-$(DEL_FILE) *~ core *.core *.stackdump
####### DEPENDENCIES
TwColors.o: TwPrecomp.h TwColors.h
TwFonts.o: TwPrecomp.h ../include/AntTweakBar.h TwFonts.h TwMgr.h TwColors.h TwGraph.h AntPerfTimer.h
TwOpenGL.o: TwPrecomp.h ../include/AntTweakBar.h TwOpenGL.h LoadOGL.h TwGraph.h TwColors.h TwFonts.h TwMgr.h AntPerfTimer.h
TwOpenGLCore.o: TwPrecomp.h ../include/AntTweakBar.h TwOpenGLCore.h LoadOGLCore.h TwGraph.h TwColors.h TwFonts.h TwMgr.h AntPerfTimer.h
TwBar.o: TwPrecomp.h ../include/AntTweakBar.h TwBar.h TwMgr.h TwColors.h TwFonts.h TwGraph.h AntPerfTimer.h
TwMgr.o: TwPrecomp.h ../include/AntTweakBar.h TwMgr.h TwColors.h TwFonts.h TwGraph.h AntPerfTimer.h TwBar.h TwOpenGL.h res/TwXCursors.h
TwPrecomp.o: TwPrecomp.h
LoadOGL.o: TwPrecomp.h LoadOGL.h
TwEventGLFW.o: ../include/AntTweakBar.h MiniGLFW.h
TwEventGLUT.o: ../include/AntTweakBar.h MiniGLUT.h
TwEventSDL.o: ../include/AntTweakBar.h
TwEventSDL12.o: ../include/AntTweakBar.h MiniSDL12.h
TwEventSDL13.o: ../include/AntTweakBar.h MiniSDL13.h
TwEventX11.o: ../include/AntTweakBar.h
####### Compiler, tools and options
SO_EXT = .dylib
AR_EXT = .a
#---- Release
CXXCFG = -O3
LFLAGS =
OUT_DIR = ../lib
#---- Debug
#CXXCFG = -g -D_DEBUG
#LFLAGS =
#OUT_DIR = ../lib/debug
#BASE = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks
CXX = g++
CXXFLAGS = $(CXXCFG) -Wall -fPIC -fno-strict-aliasing -D_MACOSX -ObjC++ -D__PLACEMENT_NEW_INLINE
INCPATH = -I../include -I/usr/local/include -I/usr/X11R6/include -I/usr/include
#-I$(BASE)/OpenGL.framework/Headers/ -I$(BASE)/GLUT.framework/Headers/ -I$(BASE)/AppKit.framework/Headers/
LINK = g++
LIBS = -framework OpenGL -framework GLUT -framework AppKit
AR = ar cqs
RANLIB =
TAR = tar -cf
GZIP = gzip -9f
COPY = cp -f
COPY_FILE = $(COPY) -p
COPY_DIR = $(COPY) -pR
DEL_FILE = rm -f
SYMLINK = ln -sf
DEL_DIR = rmdir
MOVE = mv
NO_STDERR = 2> /dev/null
####### Files
# name of the application:
TARGET = AntTweakBar
# source files without extension:
SRC_FILES = TwColors.cpp TwFonts.cpp TwOpenGL.cpp TwOpenGLCore.cpp TwBar.cpp TwMgr.cpp LoadOGL.cpp LoadOGLCore.cpp TwEventGLFW.c TwEventGLUT.c TwEventSDL.c TwEventSDL12.c TwEventSDL13.c TwEventSFML.cpp
# build object list from source files
OBJS_1 = $(SRC_FILES:.c=.o)
OBJS = $(OBJS_1:.cpp=.o)
####### Build rules
#first: depend all
first: all
all: Makefile $(TARGET)
# append dependencies to this Makefile
#depend:
# @echo "==== Make dependencies ====="
# makedepend -Y