├── .gitignore ├── README.md ├── common ├── SDL-1.2.15-win32 │ ├── README-SDL.txt │ └── SDL.dll ├── SDL-1.2.15 │ ├── BUGS.txt │ ├── COPYING.txt │ ├── README-SDL.txt │ ├── README.txt │ ├── VisualC.html │ ├── WhatsNew.txt │ ├── docs.html │ ├── docs │ │ ├── html │ │ │ ├── audio.html │ │ │ ├── cdrom.html │ │ │ ├── event.html │ │ │ ├── eventfunctions.html │ │ │ ├── eventstructures.html │ │ │ ├── general.html │ │ │ ├── guide.html │ │ │ ├── guideaboutsdldoc.html │ │ │ ├── guideaudioexamples.html │ │ │ ├── guidebasicsinit.html │ │ │ ├── guidecdromexamples.html │ │ │ ├── guidecredits.html │ │ │ ├── guideeventexamples.html │ │ │ ├── guideexamples.html │ │ │ ├── guideinput.html │ │ │ ├── guideinputkeyboard.html │ │ │ ├── guidepreface.html │ │ │ ├── guidethebasics.html │ │ │ ├── guidetimeexamples.html │ │ │ ├── guidevideo.html │ │ │ ├── guidevideoopengl.html │ │ │ ├── index.html │ │ │ ├── joystick.html │ │ │ ├── reference.html │ │ │ ├── sdlactiveevent.html │ │ │ ├── sdladdtimer.html │ │ │ ├── sdlaudiocvt.html │ │ │ ├── sdlaudiospec.html │ │ │ ├── sdlblitsurface.html │ │ │ ├── sdlbuildaudiocvt.html │ │ │ ├── sdlcd.html │ │ │ ├── sdlcdclose.html │ │ │ ├── sdlcdeject.html │ │ │ ├── sdlcdname.html │ │ │ ├── sdlcdnumdrives.html │ │ │ ├── sdlcdopen.html │ │ │ ├── sdlcdpause.html │ │ │ ├── sdlcdplay.html │ │ │ ├── sdlcdplaytracks.html │ │ │ ├── sdlcdresume.html │ │ │ ├── sdlcdstatus.html │ │ │ ├── sdlcdstop.html │ │ │ ├── sdlcdtrack.html │ │ │ ├── sdlcloseaudio.html │ │ │ ├── sdlcolor.html │ │ │ ├── sdlcondbroadcast.html │ │ │ ├── sdlcondsignal.html │ │ │ ├── sdlcondwait.html │ │ │ ├── sdlcondwaittimeout.html │ │ │ ├── sdlconvertaudio.html │ │ │ ├── sdlconvertsurface.html │ │ │ ├── sdlcreatecond.html │ │ │ ├── sdlcreatecursor.html │ │ │ ├── sdlcreatemutex.html │ │ │ ├── sdlcreatergbsurface.html │ │ │ ├── sdlcreatergbsurfacefrom.html │ │ │ ├── sdlcreatesemaphore.html │ │ │ ├── sdlcreatethread.html │ │ │ ├── sdlcreateyuvoverlay.html │ │ │ ├── sdldelay.html │ │ │ ├── sdldestroycond.html │ │ │ ├── sdldestroymutex.html │ │ │ ├── sdldestroysemaphore.html │ │ │ ├── sdldisplayformat.html │ │ │ ├── sdldisplayformatalpha.html │ │ │ ├── sdldisplayyuvoverlay.html │ │ │ ├── sdlenablekeyrepeat.html │ │ │ ├── sdlenableunicode.html │ │ │ ├── sdlenvvars.html │ │ │ ├── sdlevent.html │ │ │ ├── sdleventstate.html │ │ │ ├── sdlexposeevent.html │ │ │ ├── sdlfillrect.html │ │ │ ├── sdlflip.html │ │ │ ├── sdlfreecursor.html │ │ │ ├── sdlfreesurface.html │ │ │ ├── sdlfreewav.html │ │ │ ├── sdlfreeyuvoverlay.html │ │ │ ├── sdlgetappstate.html │ │ │ ├── sdlgetaudiostatus.html │ │ │ ├── sdlgetcliprect.html │ │ │ ├── sdlgetcursor.html │ │ │ ├── sdlgeterror.html │ │ │ ├── sdlgeteventfilter.html │ │ │ ├── sdlgetgammaramp.html │ │ │ ├── sdlgetkeyname.html │ │ │ ├── sdlgetkeystate.html │ │ │ ├── sdlgetmodstate.html │ │ │ ├── sdlgetmousestate.html │ │ │ ├── sdlgetrelativemousestate.html │ │ │ ├── sdlgetrgb.html │ │ │ ├── sdlgetrgba.html │ │ │ ├── sdlgetthreadid.html │ │ │ ├── sdlgetticks.html │ │ │ ├── sdlgetvideoinfo.html │ │ │ ├── sdlgetvideosurface.html │ │ │ ├── sdlglattr.html │ │ │ ├── sdlglgetattribute.html │ │ │ ├── sdlglgetprocaddress.html │ │ │ ├── sdlglloadlibrary.html │ │ │ ├── sdlglsetattribute.html │ │ │ ├── sdlglswapbuffers.html │ │ │ ├── sdlinit.html │ │ │ ├── sdlinitsubsystem.html │ │ │ ├── sdljoyaxisevent.html │ │ │ ├── sdljoyballevent.html │ │ │ ├── sdljoybuttonevent.html │ │ │ ├── sdljoyhatevent.html │ │ │ ├── sdljoystickclose.html │ │ │ ├── sdljoystickeventstate.html │ │ │ ├── sdljoystickgetaxis.html │ │ │ ├── sdljoystickgetball.html │ │ │ ├── sdljoystickgetbutton.html │ │ │ ├── sdljoystickgethat.html │ │ │ ├── sdljoystickindex.html │ │ │ ├── sdljoystickname.html │ │ │ ├── sdljoysticknumaxes.html │ │ │ ├── sdljoysticknumballs.html │ │ │ ├── sdljoysticknumbuttons.html │ │ │ ├── sdljoysticknumhats.html │ │ │ ├── sdljoystickopen.html │ │ │ ├── sdljoystickopened.html │ │ │ ├── sdljoystickupdate.html │ │ │ ├── sdlkey.html │ │ │ ├── sdlkeyboardevent.html │ │ │ ├── sdlkeysym.html │ │ │ ├── sdlkillthread.html │ │ │ ├── sdllistmodes.html │ │ │ ├── sdlloadbmp.html │ │ │ ├── sdlloadwav.html │ │ │ ├── sdllockaudio.html │ │ │ ├── sdllocksurface.html │ │ │ ├── sdllockyuvoverlay.html │ │ │ ├── sdlmaprgb.html │ │ │ ├── sdlmaprgba.html │ │ │ ├── sdlmixaudio.html │ │ │ ├── sdlmousebuttonevent.html │ │ │ ├── sdlmousemotionevent.html │ │ │ ├── sdlmutexp.html │ │ │ ├── sdlmutexv.html │ │ │ ├── sdlnumjoysticks.html │ │ │ ├── sdlopenaudio.html │ │ │ ├── sdloverlay.html │ │ │ ├── sdlpalette.html │ │ │ ├── sdlpauseaudio.html │ │ │ ├── sdlpeepevents.html │ │ │ ├── sdlpixelformat.html │ │ │ ├── sdlpollevent.html │ │ │ ├── sdlpumpevents.html │ │ │ ├── sdlpushevent.html │ │ │ ├── sdlquit.html │ │ │ ├── sdlquitevent.html │ │ │ ├── sdlquitsubsystem.html │ │ │ ├── sdlrect.html │ │ │ ├── sdlremovetimer.html │ │ │ ├── sdlresizeevent.html │ │ │ ├── sdlsavebmp.html │ │ │ ├── sdlsempost.html │ │ │ ├── sdlsemtrywait.html │ │ │ ├── sdlsemvalue.html │ │ │ ├── sdlsemwait.html │ │ │ ├── sdlsemwaittimeout.html │ │ │ ├── sdlsetalpha.html │ │ │ ├── sdlsetcliprect.html │ │ │ ├── sdlsetcolorkey.html │ │ │ ├── sdlsetcolors.html │ │ │ ├── sdlsetcursor.html │ │ │ ├── sdlseteventfilter.html │ │ │ ├── sdlsetgamma.html │ │ │ ├── sdlsetgammaramp.html │ │ │ ├── sdlsetmodstate.html │ │ │ ├── sdlsetpalette.html │ │ │ ├── sdlsettimer.html │ │ │ ├── sdlsetvideomode.html │ │ │ ├── sdlshowcursor.html │ │ │ ├── sdlsurface.html │ │ │ ├── sdlsyswmevent.html │ │ │ ├── sdlthreadid.html │ │ │ ├── sdlunlockaudio.html │ │ │ ├── sdlunlocksurface.html │ │ │ ├── sdlunlockyuvoverlay.html │ │ │ ├── sdlupdaterect.html │ │ │ ├── sdlupdaterects.html │ │ │ ├── sdluserevent.html │ │ │ ├── sdlvideodrivername.html │ │ │ ├── sdlvideoinfo.html │ │ │ ├── sdlvideomodeok.html │ │ │ ├── sdlwaitevent.html │ │ │ ├── sdlwaitthread.html │ │ │ ├── sdlwarpmouse.html │ │ │ ├── sdlwasinit.html │ │ │ ├── sdlwmgetcaption.html │ │ │ ├── sdlwmgrabinput.html │ │ │ ├── sdlwmiconifywindow.html │ │ │ ├── sdlwmsetcaption.html │ │ │ ├── sdlwmseticon.html │ │ │ ├── sdlwmtogglefullscreen.html │ │ │ ├── thread.html │ │ │ ├── time.html │ │ │ ├── video.html │ │ │ └── wm.html │ │ ├── images │ │ │ └── rainbow.gif │ │ └── index.html │ └── include │ │ ├── SDL.h │ │ ├── SDL_active.h │ │ ├── SDL_audio.h │ │ ├── SDL_byteorder.h │ │ ├── SDL_cdrom.h │ │ ├── SDL_config.h │ │ ├── SDL_config_dreamcast.h │ │ ├── SDL_config_macos.h │ │ ├── SDL_config_macosx.h │ │ ├── SDL_config_minimal.h │ │ ├── SDL_config_nds.h │ │ ├── SDL_config_os2.h │ │ ├── SDL_config_symbian.h │ │ ├── SDL_config_win32.h │ │ ├── SDL_copying.h │ │ ├── SDL_cpuinfo.h │ │ ├── SDL_endian.h │ │ ├── SDL_error.h │ │ ├── SDL_events.h │ │ ├── SDL_getenv.h │ │ ├── SDL_joystick.h │ │ ├── SDL_keyboard.h │ │ ├── SDL_keysym.h │ │ ├── SDL_loadso.h │ │ ├── SDL_main.h │ │ ├── SDL_mouse.h │ │ ├── SDL_mutex.h │ │ ├── SDL_name.h │ │ ├── SDL_opengl.h │ │ ├── SDL_platform.h │ │ ├── SDL_quit.h │ │ ├── SDL_rwops.h │ │ ├── SDL_stdinc.h │ │ ├── SDL_syswm.h │ │ ├── SDL_thread.h │ │ ├── SDL_timer.h │ │ ├── SDL_types.h │ │ ├── SDL_version.h │ │ ├── SDL_video.h │ │ ├── begin_code.h │ │ └── close_code.h └── include │ ├── CMakeLists.txt │ ├── SDLauxiliary.h │ └── glm │ ├── CMakeLists.txt │ ├── CTestConfig.cmake │ ├── bench │ ├── CMakeLists.txt │ ├── core │ │ └── CMakeLists.txt │ ├── gtc │ │ └── CMakeLists.txt │ └── gtx │ │ └── CMakeLists.txt │ ├── copying.txt │ ├── doc │ ├── CMakeLists.txt │ ├── about.html │ ├── api-0.9.3 │ │ ├── a00001.html │ │ ├── a00002.html │ │ ├── a00003.html │ │ ├── a00004.html │ │ ├── a00004_source.html │ │ ├── a00005.html │ │ ├── a00005_source.html │ │ ├── a00006.html │ │ ├── a00006_source.html │ │ ├── a00007.html │ │ ├── a00007_source.html │ │ ├── a00008.html │ │ ├── a00008_source.html │ │ ├── a00009.html │ │ ├── a00009_source.html │ │ ├── a00010.html │ │ ├── a00010_source.html │ │ ├── a00011_source.html │ │ ├── a00012.html │ │ ├── a00012_source.html │ │ ├── a00013.html │ │ ├── a00013_source.html │ │ ├── a00014.html │ │ ├── a00014_source.html │ │ ├── a00015.html │ │ ├── a00015_source.html │ │ ├── a00016.html │ │ ├── a00016_source.html │ │ ├── a00017.html │ │ ├── a00017_source.html │ │ ├── a00018.html │ │ ├── a00018_source.html │ │ ├── a00019.html │ │ ├── a00019_source.html │ │ ├── a00020_source.html │ │ ├── a00021.html │ │ ├── a00021_source.html │ │ ├── a00022.html │ │ ├── a00022_source.html │ │ ├── a00023.html │ │ ├── a00023_source.html │ │ ├── a00024.html │ │ ├── a00024_source.html │ │ ├── a00025.html │ │ ├── a00025_source.html │ │ ├── a00026.html │ │ ├── a00026_source.html │ │ ├── a00027.html │ │ ├── a00027_source.html │ │ ├── a00028.html │ │ ├── a00028_source.html │ │ ├── a00029.html │ │ ├── a00029_source.html │ │ ├── a00030.html │ │ ├── a00030_source.html │ │ ├── a00031.html │ │ ├── a00031_source.html │ │ ├── a00032.html │ │ ├── a00032_source.html │ │ ├── a00033.html │ │ ├── a00033_source.html │ │ ├── a00034.html │ │ ├── a00034_source.html │ │ ├── a00035.html │ │ ├── a00035_source.html │ │ ├── a00036.html │ │ ├── a00036_source.html │ │ ├── a00037.html │ │ ├── a00037_source.html │ │ ├── a00038.html │ │ ├── a00038_source.html │ │ ├── a00039.html │ │ ├── a00039_source.html │ │ ├── a00040.html │ │ ├── a00040_source.html │ │ ├── a00041.html │ │ ├── a00041_source.html │ │ ├── a00042.html │ │ ├── a00042_source.html │ │ ├── a00043.html │ │ ├── a00043_source.html │ │ ├── a00044.html │ │ ├── a00044_source.html │ │ ├── a00045.html │ │ ├── a00045_source.html │ │ ├── a00046.html │ │ ├── a00046_source.html │ │ ├── a00047_source.html │ │ ├── a00048.html │ │ ├── a00048_source.html │ │ ├── a00049.html │ │ ├── a00049_source.html │ │ ├── a00050.html │ │ ├── a00050_source.html │ │ ├── a00051_source.html │ │ ├── a00052.html │ │ ├── a00052_source.html │ │ ├── a00053.html │ │ ├── a00053_source.html │ │ ├── a00054.html │ │ ├── a00054_source.html │ │ ├── a00055.html │ │ ├── a00055_source.html │ │ ├── a00056.html │ │ ├── a00056_source.html │ │ ├── a00057.html │ │ ├── a00057_source.html │ │ ├── a00058.html │ │ ├── a00058_source.html │ │ ├── a00059.html │ │ ├── a00059_source.html │ │ ├── a00060.html │ │ ├── a00060_source.html │ │ ├── a00061.html │ │ ├── a00061_source.html │ │ ├── a00062.html │ │ ├── a00062_source.html │ │ ├── a00063.html │ │ ├── a00063_source.html │ │ ├── a00064.html │ │ ├── a00064_source.html │ │ ├── a00065.html │ │ ├── a00065_source.html │ │ ├── a00066.html │ │ ├── a00066_source.html │ │ ├── a00067.html │ │ ├── a00067_source.html │ │ ├── a00068.html │ │ ├── a00068_source.html │ │ ├── a00069.html │ │ ├── a00069_source.html │ │ ├── a00070.html │ │ ├── a00070_source.html │ │ ├── a00071.html │ │ ├── a00071_source.html │ │ ├── a00072_source.html │ │ ├── a00073.html │ │ ├── a00073_source.html │ │ ├── a00074.html │ │ ├── a00074_source.html │ │ ├── a00075.html │ │ ├── a00075_source.html │ │ ├── a00076.html │ │ ├── a00076_source.html │ │ ├── a00077.html │ │ ├── a00077_source.html │ │ ├── a00078.html │ │ ├── a00078_source.html │ │ ├── a00079.html │ │ ├── a00079_source.html │ │ ├── a00080.html │ │ ├── a00080_source.html │ │ ├── a00081.html │ │ ├── a00081_source.html │ │ ├── a00082.html │ │ ├── a00082_source.html │ │ ├── a00083.html │ │ ├── a00083_source.html │ │ ├── a00084_source.html │ │ ├── a00085.html │ │ ├── a00085_source.html │ │ ├── a00086.html │ │ ├── a00086_source.html │ │ ├── a00087.html │ │ ├── a00087_source.html │ │ ├── a00088.html │ │ ├── a00088_source.html │ │ ├── a00089.html │ │ ├── a00089_source.html │ │ ├── a00090.html │ │ ├── a00090_source.html │ │ ├── a00091.html │ │ ├── a00091_source.html │ │ ├── a00092.html │ │ ├── a00092_source.html │ │ ├── a00093.html │ │ ├── a00093_source.html │ │ ├── a00094.html │ │ ├── a00094_source.html │ │ ├── a00095.html │ │ ├── a00095_source.html │ │ ├── a00096.html │ │ ├── a00096_source.html │ │ ├── a00097.html │ │ ├── a00097_source.html │ │ ├── a00098.html │ │ ├── a00098_source.html │ │ ├── a00099.html │ │ ├── a00099_source.html │ │ ├── a00100.html │ │ ├── a00100_source.html │ │ ├── a00101.html │ │ ├── a00101_source.html │ │ ├── a00102.html │ │ ├── a00102_source.html │ │ ├── a00103.html │ │ ├── a00103_source.html │ │ ├── a00104.html │ │ ├── a00104_source.html │ │ ├── a00105.html │ │ ├── a00105_source.html │ │ ├── a00106.html │ │ ├── a00106_source.html │ │ ├── a00107.html │ │ ├── a00107_source.html │ │ ├── a00108.html │ │ ├── a00108_source.html │ │ ├── a00109.html │ │ ├── a00109_source.html │ │ ├── a00110.html │ │ ├── a00110_source.html │ │ ├── a00111.html │ │ ├── a00111_source.html │ │ ├── a00112.html │ │ ├── a00112_source.html │ │ ├── a00113.html │ │ ├── a00113_source.html │ │ ├── a00114.html │ │ ├── a00114_source.html │ │ ├── a00115.html │ │ ├── a00115_source.html │ │ ├── a00116_source.html │ │ ├── a00117.html │ │ ├── a00117_source.html │ │ ├── a00118.html │ │ ├── a00118_source.html │ │ ├── a00119.html │ │ ├── a00119_source.html │ │ ├── a00120.html │ │ ├── a00120_source.html │ │ ├── a00121.html │ │ ├── a00121_source.html │ │ ├── a00122.html │ │ ├── a00122_source.html │ │ ├── a00123.html │ │ ├── a00123_source.html │ │ ├── a00127.html │ │ ├── a00128.html │ │ ├── a00129.html │ │ ├── a00130.html │ │ ├── a00131.html │ │ ├── a00132.html │ │ ├── a00133.html │ │ ├── a00134.html │ │ ├── a00135.html │ │ ├── a00136.html │ │ ├── a00137.html │ │ ├── a00138.html │ │ ├── a00139.html │ │ ├── a00140.html │ │ ├── a00141.html │ │ ├── a00142.html │ │ ├── a00143.html │ │ ├── a00144.html │ │ ├── a00145.html │ │ ├── a00146.html │ │ ├── a00147.html │ │ ├── a00148.html │ │ ├── a00149.html │ │ ├── a00150.html │ │ ├── a00151.html │ │ ├── a00152.html │ │ ├── a00153.html │ │ ├── a00154.html │ │ ├── a00155.html │ │ ├── a00156.html │ │ ├── a00157.html │ │ ├── a00158.html │ │ ├── a00159.html │ │ ├── a00160.html │ │ ├── a00161.html │ │ ├── a00162.html │ │ ├── a00163.html │ │ ├── a00164.html │ │ ├── a00165.html │ │ ├── a00166.html │ │ ├── a00167.html │ │ ├── a00168.html │ │ ├── a00169.html │ │ ├── a00170.html │ │ ├── a00171.html │ │ ├── a00172.html │ │ ├── a00173.html │ │ ├── a00174.html │ │ ├── a00175.html │ │ ├── a00176.html │ │ ├── a00177.html │ │ ├── a00178.html │ │ ├── a00179.html │ │ ├── a00180.html │ │ ├── a00181.html │ │ ├── a00182.html │ │ ├── a00183.html │ │ ├── a00184.html │ │ ├── a00185.html │ │ ├── a00186.html │ │ ├── a00187.html │ │ ├── a00188.html │ │ ├── a00189.html │ │ ├── a00190.html │ │ ├── a00191.html │ │ ├── a00192.html │ │ ├── a00193.html │ │ ├── a00194.html │ │ ├── a00195.html │ │ ├── a00196.html │ │ ├── a00197.html │ │ ├── a00198.html │ │ ├── a00199.html │ │ ├── a00200.html │ │ ├── a00201.html │ │ ├── a00202.html │ │ ├── a00203.html │ │ ├── a00204.html │ │ ├── a00205.html │ │ ├── a00206.html │ │ ├── a00207.html │ │ ├── a00208.html │ │ ├── a00209.html │ │ ├── a00210.html │ │ ├── a00211.html │ │ ├── a00212.html │ │ ├── a00213.html │ │ ├── a00214.html │ │ ├── a00215.html │ │ ├── a00217.html │ │ ├── a00218.html │ │ ├── annotated.html │ │ ├── background.jpg │ │ ├── bc_s.png │ │ ├── classes.html │ │ ├── closed.png │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── files.html │ │ ├── functions.html │ │ ├── functions_func.html │ │ ├── index.html │ │ ├── jquery.js │ │ ├── logo-mini.png │ │ ├── modules.html │ │ ├── nav_f.png │ │ ├── nav_h.png │ │ ├── open.png │ │ ├── pages.html │ │ ├── tab_a.png │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_s.png │ │ └── tabs.css │ ├── code.html │ ├── common │ │ ├── email.png │ │ ├── g-truc.png │ │ ├── logo.png │ │ ├── opengl.jpg │ │ ├── sourceforge.gif │ │ ├── style.css │ │ └── title.png │ ├── download.html │ ├── glm-0.9.3.pdf │ ├── goodies.html │ ├── goodies │ │ ├── logo1024x0640.png │ │ ├── logo1280x0800.png │ │ ├── logo1600x1000.png │ │ ├── logo1920x1200.png │ │ ├── logo2560x1600.png │ │ └── tenby-five.otf │ ├── image │ │ ├── 0029-mini.jpg │ │ ├── 0029.jpg │ │ ├── 0075-1.jpg │ │ ├── 0075-2.jpg │ │ ├── font-mini.png │ │ ├── font.png │ │ ├── logo-mini.png │ │ └── logo.png │ ├── index.html │ ├── man.doxy │ ├── pages.doxy │ ├── src │ │ ├── about.xsl │ │ ├── code.xsl │ │ ├── data.xml │ │ ├── download.xsl │ │ ├── dummy.cpp │ │ ├── goodies.xsl │ │ ├── link.xsl │ │ ├── news.xsl │ │ └── util.xsl │ └── theme │ │ ├── background.jpg │ │ ├── doxygen.css │ │ └── tabs.css │ ├── glm │ ├── CMakeLists.txt │ ├── core │ │ ├── _detail.hpp │ │ ├── _fixes.hpp │ │ ├── _swizzle.hpp │ │ ├── _swizzle_func.hpp │ │ ├── _vectorize.hpp │ │ ├── dummy.cpp │ │ ├── func_common.hpp │ │ ├── func_common.inl │ │ ├── func_exponential.hpp │ │ ├── func_exponential.inl │ │ ├── func_geometric.hpp │ │ ├── func_geometric.inl │ │ ├── func_integer.hpp │ │ ├── func_integer.inl │ │ ├── func_matrix.hpp │ │ ├── func_matrix.inl │ │ ├── func_noise.hpp │ │ ├── func_noise.inl │ │ ├── func_packing.hpp │ │ ├── func_packing.inl │ │ ├── func_trigonometric.hpp │ │ ├── func_trigonometric.inl │ │ ├── func_vector_relational.hpp │ │ ├── func_vector_relational.inl │ │ ├── hint.hpp │ │ ├── intrinsic_common.hpp │ │ ├── intrinsic_common.inl │ │ ├── intrinsic_exponential.hpp │ │ ├── intrinsic_exponential.inl │ │ ├── intrinsic_geometric.hpp │ │ ├── intrinsic_geometric.inl │ │ ├── intrinsic_matrix.hpp │ │ ├── intrinsic_matrix.inl │ │ ├── intrinsic_trigonometric.hpp │ │ ├── intrinsic_trigonometric.inl │ │ ├── intrinsic_vector_relational.hpp │ │ ├── intrinsic_vector_relational.inl │ │ ├── setup.hpp │ │ ├── type.hpp │ │ ├── type_float.hpp │ │ ├── type_gentype.hpp │ │ ├── type_gentype.inl │ │ ├── type_half.hpp │ │ ├── type_half.inl │ │ ├── type_int.hpp │ │ ├── type_mat.hpp │ │ ├── type_mat.inl │ │ ├── type_mat2x2.hpp │ │ ├── type_mat2x2.inl │ │ ├── type_mat2x3.hpp │ │ ├── type_mat2x3.inl │ │ ├── type_mat2x4.hpp │ │ ├── type_mat2x4.inl │ │ ├── type_mat3x2.hpp │ │ ├── type_mat3x2.inl │ │ ├── type_mat3x3.hpp │ │ ├── type_mat3x3.inl │ │ ├── type_mat3x4.hpp │ │ ├── type_mat3x4.inl │ │ ├── type_mat4x2.hpp │ │ ├── type_mat4x2.inl │ │ ├── type_mat4x3.hpp │ │ ├── type_mat4x3.inl │ │ ├── type_mat4x4.hpp │ │ ├── type_mat4x4.inl │ │ ├── type_size.hpp │ │ ├── type_vec.hpp │ │ ├── type_vec.inl │ │ ├── type_vec1.hpp │ │ ├── type_vec1.inl │ │ ├── type_vec2.hpp │ │ ├── type_vec2.inl │ │ ├── type_vec3.hpp │ │ ├── type_vec3.inl │ │ ├── type_vec4.hpp │ │ └── type_vec4.inl │ ├── ext.hpp │ ├── glm.hpp │ ├── gtc │ │ ├── half_float.hpp │ │ ├── half_float.inl │ │ ├── matrix_access.hpp │ │ ├── matrix_access.inl │ │ ├── matrix_integer.hpp │ │ ├── matrix_inverse.hpp │ │ ├── matrix_inverse.inl │ │ ├── matrix_transform.hpp │ │ ├── matrix_transform.inl │ │ ├── noise.hpp │ │ ├── noise.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── random.hpp │ │ ├── random.inl │ │ ├── swizzle.hpp │ │ ├── swizzle.inl │ │ ├── type_precision.hpp │ │ ├── type_precision.inl │ │ ├── type_ptr.hpp │ │ └── type_ptr.inl │ ├── gtx │ │ ├── associated_min_max.hpp │ │ ├── associated_min_max.inl │ │ ├── bit.hpp │ │ ├── bit.inl │ │ ├── closest_point.hpp │ │ ├── closest_point.inl │ │ ├── color_cast.hpp │ │ ├── color_cast.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── color_space_YCoCg.hpp │ │ ├── color_space_YCoCg.inl │ │ ├── compatibility.hpp │ │ ├── compatibility.inl │ │ ├── component_wise.hpp │ │ ├── component_wise.inl │ │ ├── constants.hpp │ │ ├── constants.inl │ │ ├── epsilon.hpp │ │ ├── epsilon.inl │ │ ├── euler_angles.hpp │ │ ├── euler_angles.inl │ │ ├── extend.hpp │ │ ├── extend.inl │ │ ├── extented_min_max.hpp │ │ ├── extented_min_max.inl │ │ ├── fast_exponential.hpp │ │ ├── fast_exponential.inl │ │ ├── fast_square_root.hpp │ │ ├── fast_square_root.inl │ │ ├── fast_trigonometry.hpp │ │ ├── fast_trigonometry.inl │ │ ├── gradient_paint.hpp │ │ ├── gradient_paint.inl │ │ ├── handed_coordinate_space.hpp │ │ ├── handed_coordinate_space.inl │ │ ├── inertia.hpp │ │ ├── inertia.inl │ │ ├── int_10_10_10_2.hpp │ │ ├── int_10_10_10_2.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── intersect.hpp │ │ ├── intersect.inl │ │ ├── log_base.hpp │ │ ├── log_base.inl │ │ ├── matrix_cross_product.hpp │ │ ├── matrix_cross_product.inl │ │ ├── matrix_interpolation.hpp │ │ ├── matrix_interpolation.inl │ │ ├── matrix_major_storage.hpp │ │ ├── matrix_major_storage.inl │ │ ├── matrix_operation.hpp │ │ ├── matrix_operation.inl │ │ ├── matrix_query.hpp │ │ ├── matrix_query.inl │ │ ├── mixed_product.hpp │ │ ├── mixed_product.inl │ │ ├── multiple.hpp │ │ ├── multiple.inl │ │ ├── noise.hpp │ │ ├── noise.inl │ │ ├── norm.hpp │ │ ├── norm.inl │ │ ├── normal.hpp │ │ ├── normal.inl │ │ ├── normalize_dot.hpp │ │ ├── normalize_dot.inl │ │ ├── number_precision.hpp │ │ ├── number_precision.inl │ │ ├── ocl_type.hpp │ │ ├── ocl_type.inl │ │ ├── optimum_pow.hpp │ │ ├── optimum_pow.inl │ │ ├── orthonormalize.hpp │ │ ├── orthonormalize.inl │ │ ├── perpendicular.hpp │ │ ├── perpendicular.inl │ │ ├── polar_coordinates.hpp │ │ ├── polar_coordinates.inl │ │ ├── projection.hpp │ │ ├── projection.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── random.hpp │ │ ├── random.inl │ │ ├── raw_data.hpp │ │ ├── raw_data.inl │ │ ├── reciprocal.hpp │ │ ├── reciprocal.inl │ │ ├── rotate_vector.hpp │ │ ├── rotate_vector.inl │ │ ├── simd_mat4.hpp │ │ ├── simd_mat4.inl │ │ ├── simd_vec4.hpp │ │ ├── simd_vec4.inl │ │ ├── spline.hpp │ │ ├── spline.inl │ │ ├── std_based_type.hpp │ │ ├── std_based_type.inl │ │ ├── string_cast.hpp │ │ ├── string_cast.inl │ │ ├── transform.hpp │ │ ├── transform.inl │ │ ├── transform2.hpp │ │ ├── transform2.inl │ │ ├── ulp.hpp │ │ ├── ulp.inl │ │ ├── unsigned_int.hpp │ │ ├── unsigned_int.inl │ │ ├── vec1.hpp │ │ ├── vec1.inl │ │ ├── vector_access.hpp │ │ ├── vector_access.inl │ │ ├── vector_angle.hpp │ │ ├── vector_angle.inl │ │ ├── vector_query.hpp │ │ ├── vector_query.inl │ │ ├── verbose_operator.hpp │ │ ├── verbose_operator.inl │ │ ├── wrap.hpp │ │ └── wrap.inl │ └── virtrev │ │ └── xstream.hpp │ ├── readme.txt │ ├── test │ ├── CMakeLists.txt │ ├── bug │ │ └── CMakeLists.txt │ ├── core │ │ ├── CMakeLists.txt │ │ ├── core_func_common.cpp │ │ ├── core_func_exponential.cpp │ │ ├── core_func_geometric.cpp │ │ ├── core_func_integer.cpp │ │ ├── core_func_matrix.cpp │ │ ├── core_func_noise.cpp │ │ ├── core_func_packing.cpp │ │ ├── core_func_swizzle.cpp │ │ ├── core_func_trigonometric.cpp │ │ ├── core_func_vector_relational.cpp │ │ ├── core_setup_message.cpp │ │ ├── core_setup_precision.cpp │ │ ├── core_type_float.cpp │ │ ├── core_type_half.cpp │ │ ├── core_type_int.cpp │ │ ├── core_type_length.cpp │ │ ├── core_type_mat2x2.cpp │ │ ├── core_type_mat2x3.cpp │ │ ├── core_type_mat2x4.cpp │ │ ├── core_type_mat3x2.cpp │ │ ├── core_type_mat3x3.cpp │ │ ├── core_type_mat3x4.cpp │ │ ├── core_type_mat4x2.cpp │ │ ├── core_type_mat4x3.cpp │ │ ├── core_type_mat4x4.cpp │ │ ├── core_type_vec1.cpp │ │ ├── core_type_vec2.cpp │ │ ├── core_type_vec3.cpp │ │ └── core_type_vec4.cpp │ ├── external │ │ └── gli │ │ │ ├── CMakeLists.txt │ │ │ ├── core │ │ │ ├── dummy.cpp │ │ │ ├── generate_mipmaps.hpp │ │ │ ├── generate_mipmaps.inl │ │ │ ├── image2d.hpp │ │ │ ├── image2d.inl │ │ │ ├── operation.hpp │ │ │ ├── operation.inl │ │ │ ├── operator.hpp │ │ │ ├── operator.inl │ │ │ ├── shared_array.hpp │ │ │ ├── shared_array.inl │ │ │ ├── shared_ptr.hpp │ │ │ ├── shared_ptr.inl │ │ │ ├── size.hpp │ │ │ ├── size.inl │ │ │ ├── texture2d.hpp │ │ │ ├── texture2d.inl │ │ │ ├── texture2d_array.hpp │ │ │ ├── texture2d_array.inl │ │ │ ├── texture_cube.hpp │ │ │ ├── texture_cube.inl │ │ │ ├── texture_cube_array.hpp │ │ │ └── texture_cube_array.inl │ │ │ ├── gli.hpp │ │ │ └── gtx │ │ │ ├── compression.hpp │ │ │ ├── compression.inl │ │ │ ├── fetch.hpp │ │ │ ├── fetch.inl │ │ │ ├── gl_texture2d.hpp │ │ │ ├── gl_texture2d.inl │ │ │ ├── gradient.hpp │ │ │ ├── gradient.inl │ │ │ ├── loader.hpp │ │ │ ├── loader.inl │ │ │ ├── loader_dds10.hpp │ │ │ ├── loader_dds10.inl │ │ │ ├── loader_dds9.hpp │ │ │ ├── loader_dds9.inl │ │ │ ├── loader_tga.hpp │ │ │ ├── loader_tga.inl │ │ │ ├── wavelet.hpp │ │ │ └── wavelet.inl │ ├── glm.cppcheck │ ├── gtc │ │ ├── CMakeLists.txt │ │ ├── gtc_half_float.cpp │ │ ├── gtc_matrix_access.cpp │ │ ├── gtc_matrix_integer.cpp │ │ ├── gtc_matrix_inverse.cpp │ │ ├── gtc_matrix_transform.cpp │ │ ├── gtc_noise.cpp │ │ ├── gtc_quaternion.cpp │ │ ├── gtc_random.cpp │ │ ├── gtc_swizzle.cpp │ │ ├── gtc_type_precision.cpp │ │ └── gtc_type_ptr.cpp │ └── gtx │ │ ├── CMakeLists.txt │ │ ├── gtx_bit.cpp │ │ ├── gtx_gradient_paint.cpp │ │ ├── gtx_integer.cpp │ │ ├── gtx_matrix_query.cpp │ │ ├── gtx_noise.cpp │ │ ├── gtx_quaternion.cpp │ │ ├── gtx_random.cpp │ │ ├── gtx_rotate_vector.cpp │ │ ├── gtx_simd_mat4.cpp │ │ ├── gtx_simd_vec4.cpp │ │ ├── gtx_string_cast.cpp │ │ ├── gtx_ulp.cpp │ │ ├── gtx_vector_angle.cpp │ │ └── gtx_vector_query.cpp │ └── util │ ├── FindGLM.cmake │ ├── autoexp.txt │ ├── autoexp.vc2010.dat │ ├── gen_external_templates.py │ ├── glm_core.cpp │ └── usertype.dat ├── rasterisation ├── cornell_box.jpg ├── exe │ ├── SDL.dll │ ├── rasterization.exe │ └── rasterization_interpolation.exe ├── latex │ ├── content.tex │ ├── img │ │ ├── bug1.jpg │ │ ├── bug2.jpg │ │ ├── colors.jpg │ │ ├── colors_bug.jpg │ │ ├── depth_buffer.jpg │ │ ├── edges1.jpg │ │ ├── edges2.jpg │ │ ├── final1.jpg │ │ ├── final2.jpg │ │ ├── final3.jpg │ │ ├── final4.jpg │ │ ├── icon.png │ │ ├── interpolated_light.jpg │ │ ├── interpolated_pos1.jpg │ │ ├── interpolated_pos2.jpg │ │ ├── interpolated_pos3.jpg │ │ ├── logo_kth.jpg │ │ └── points.jpg │ ├── rapport.tex │ ├── report.sty │ └── title.tex ├── rasterisation │ ├── Rasterisation.cpp │ ├── TestModel.h │ ├── rasterisation.sln │ └── rasterisation │ │ ├── rasterisation.vcxproj │ │ └── rasterisation.vcxproj.filters ├── report.pdf └── subject.pdf └── raytracing ├── cornell_box.png ├── exe ├── SDL.dll └── raytracing.exe ├── latex ├── img │ ├── antialiasing │ │ ├── benchmarksAA.png │ │ ├── grayscale.jpg │ │ ├── no_aa.png │ │ ├── sobel.jpg │ │ ├── sto16x.png │ │ ├── sto8x.png │ │ ├── stoAA16x_full.png │ │ ├── stochastic.jpg │ │ ├── super8x.png │ │ └── uniform.jpg │ ├── backward.jpg │ ├── benchmarksThreads.png │ ├── final.png │ ├── forward.jpg │ ├── glass_awesome.png │ ├── glass_refraction.jpg │ ├── icon.png │ ├── ind_light.jpg │ ├── init.jpg │ ├── left.jpg │ ├── light1.jpg │ ├── light2.jpg │ ├── light3.jpg │ ├── light_col1.jpg │ ├── light_col2.jpg │ ├── light_col3.jpg │ ├── logo_kth.jpg │ ├── ray.jpg │ ├── right.jpg │ ├── shadows.jpg │ ├── shadows │ │ ├── 16.png │ │ ├── 16_jittered.png │ │ ├── 256.png │ │ ├── 256_jittered.png │ │ ├── 64.png │ │ ├── 64_jittered.png │ │ ├── light1.jpg │ │ └── light2.jpg │ ├── specular.jpg │ └── spheres.jpg ├── part1.tex ├── part2.tex ├── rapport.tex ├── references.bib ├── report.sty └── title.tex ├── raytracing ├── Fast_raytracer │ └── SDL.dll ├── raytracing.sln └── raytracing │ ├── Material.h │ ├── Multithreading.cpp │ ├── Multithreading.h │ ├── Object3D.h │ ├── RCa06020 │ ├── Raytracing.h │ ├── Sphere.h │ ├── TestModel.h │ ├── Triangle.h │ ├── raytracing.cpp │ ├── raytracing.rc │ ├── raytracing.vcxproj │ └── raytracing.vcxproj.filters ├── report.pdf ├── resource ├── benchmarksAA.py └── benchmarksThreads.py └── subject.pdf /README.md: -------------------------------------------------------------------------------- 1 | Computer graphics 2 | ================= 3 | Ray tracing 4 | ----------- 5 | - Objects: triangles and spheres 6 | - Materials: 7 | - Diffuse (absorption) 8 | - Specular (reflection) 9 | - Diffuse and specular (absorption and reflection) 10 | - Glass (refraction and reflection) 11 | - Direct illumination + constant indirect illumination 12 | - Soft shadows (NxN light sources) according to the following light sources distribution: 13 | - Uniform 14 | - Jittered by stochastic sampling 15 | - Anti-aliasing: 16 | - Uniform 8x 17 | - Jittered by stochastic sampling 2x, 4x, 8x, 16x, 64x 18 | - Multithreading (processing and anti-aliasing) 19 | 20 | ![Alt text](raytracing/cornell_box.png?raw=true "Cornell Box") 21 | 22 | Rasterisation 23 | ------------- 24 | - Triangles 25 | - Depth buffer 26 | - Direct illumination by interpolated pixel positions + constant indirect illumination 27 | -------------------------------------------------------------------------------- /common/SDL-1.2.15-win32/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library 5 | designed to make it easy to write multi-media software, such as games and 6 | emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | http://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the GNU LGPL license: 12 | http://www.gnu.org/copyleft/lesser.html 13 | 14 | -------------------------------------------------------------------------------- /common/SDL-1.2.15-win32/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/SDL-1.2.15-win32/SDL.dll -------------------------------------------------------------------------------- /common/SDL-1.2.15/BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL bug tracker, here: 3 | 4 | http://bugzilla.libsdl.org/ 5 | 6 | You may report bugs there, and search to see if a given issue has already 7 | been reported, discussed, and maybe even fixed. 8 | 9 | 10 | 11 | You may also find help at the SDL mailing list. Subscription information: 12 | 13 | http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org 14 | 15 | Bug reports are welcome here, but we really appreciate if you use Bugzilla, as 16 | bugs discussed on the mailing list may be forgotten or missed. 17 | 18 | 19 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library 5 | designed to make it easy to write multi-media software, such as games and 6 | emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | http://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the GNU LGPL license: 12 | http://www.gnu.org/copyleft/lesser.html 13 | 14 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | 4 | (SDL) 5 | 6 | Version 1.2 7 | 8 | --- 9 | http://www.libsdl.org/ 10 | 11 | This is the Simple DirectMedia Layer, a general API that provides low 12 | level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, 13 | and 2D framebuffer across multiple platforms. 14 | 15 | The current version supports Linux, Windows CE/95/98/ME/XP/Vista, BeOS, 16 | MacOS Classic, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, 17 | and QNX. The code contains support for Dreamcast, Atari, AIX, OSF/Tru64, 18 | RISC OS, SymbianOS, Nintendo DS, and OS/2, but these are not officially 19 | supported. 20 | 21 | SDL is written in C, but works with C++ natively, and has bindings to 22 | several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, 23 | Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, 24 | Pike, Pliant, Python, Ruby, and Smalltalk. 25 | 26 | This library is distributed under GNU LGPL version 2, which can be 27 | found in the file "COPYING". This license allows you to use SDL 28 | freely in commercial programs as long as you link with the dynamic 29 | library. 30 | 31 | The best way to learn how to use SDL is to check out the header files in 32 | the "include" subdirectory and the programs in the "test" subdirectory. 33 | The header files and test programs are well commented and always up to date. 34 | More documentation is available in HTML format in "docs/index.html", and 35 | a documentation wiki is available online at: 36 | http://www.libsdl.org/cgi/docwiki.cgi 37 | 38 | The test programs in the "test" subdirectory are in the public domain. 39 | 40 | Frequently asked questions are answered online: 41 | http://www.libsdl.org/faq.php 42 | 43 | If you need help with the library, or just want to discuss SDL related 44 | issues, you can join the developers mailing list: 45 | http://www.libsdl.org/mailing-list.php 46 | 47 | Enjoy! 48 | Sam Lantinga (slouken@libsdl.org) 49 | 50 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/docs/html/guidecredits.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/SDL-1.2.15/docs/html/guidecredits.html -------------------------------------------------------------------------------- /common/SDL-1.2.15/docs/images/rainbow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/SDL-1.2.15/docs/images/rainbow.gif -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/SDL_byteorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_byteorder.h 25 | * @deprecated Use SDL_endian.h instead 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_endian.h" 30 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_h 24 | #define _SDL_config_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* Add any platform that doesn't build using the configure system */ 29 | #if defined(__DREAMCAST__) 30 | #include "SDL_config_dreamcast.h" 31 | #elif defined(__MACOS__) 32 | #include "SDL_config_macos.h" 33 | #elif defined(__MACOSX__) 34 | #include "SDL_config_macosx.h" 35 | #elif defined(__SYMBIAN32__) 36 | #include "SDL_config_symbian.h" /* must be before win32! */ 37 | #elif defined(__WIN32__) 38 | #include "SDL_config_win32.h" 39 | #elif defined(__OS2__) 40 | #include "SDL_config_os2.h" 41 | #else 42 | #include "SDL_config_minimal.h" 43 | #endif /* platform config */ 44 | 45 | #endif /* _SDL_config_h */ 46 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/SDL_getenv.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_getenv.h 24 | * @deprecated Use SDL_stdinc.h instead 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/SDL_name.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _SDLname_h_ 3 | #define _SDLname_h_ 4 | 5 | #if defined(__STDC__) || defined(__cplusplus) 6 | #define NeedFunctionPrototypes 1 7 | #endif 8 | 9 | #define SDL_NAME(X) SDL_##X 10 | 11 | #endif /* _SDLname_h_ */ 12 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_types.h 24 | * @deprecated Use SDL_stdinc.h instead. 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /common/SDL-1.2.15/include/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file close_code.h 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /** 32 | * @file close_code.h 33 | * Reset structure packing at previous byte alignment 34 | */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #if (defined(__MWERKS__) && defined(__MACOS__)) 40 | #pragma options align=reset 41 | #pragma enumsalwaysint reset 42 | #else 43 | #pragma pack(pop) 44 | #endif 45 | #endif /* Compiler needs structure packing set */ 46 | 47 | -------------------------------------------------------------------------------- /common/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Top-Level CMakeList.txt 2 | 3 | cmake_minimum_required (VERSION 2.6) 4 | project ( FirstLab ) 5 | 6 | add_executable( FirstLab rendering.cpp) 7 | 8 | find_package (SDL) 9 | 10 | if ( NOT SDL_FOUND ) 11 | message ( FATAL_ERROR "SDL not found!" ) 12 | endif ( NOT SDL_FOUND ) 13 | 14 | if(SDL_FOUND) 15 | include_directories( 16 | ${SDL_INCLUDE_DIR} 17 | ${PROJECT_SOURCE_DIR}/glm 18 | ) 19 | #link_libraries(${SDL_LIBRARY}) 20 | target_link_libraries(FirstLab ${SDL_LIBRARY}) 21 | endif(SDL_FOUND) 22 | 23 | -------------------------------------------------------------------------------- /common/include/glm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6 FATAL_ERROR) 2 | cmake_policy(VERSION 2.6) 3 | 4 | project(glm) 5 | enable_testing() 6 | 7 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 8 | 9 | if(CMAKE_COMPILER_IS_GNUCXX) 10 | #add_definitions(/Za) 11 | #add_definitions(-pedantic) 12 | #add_definitions(-S) 13 | #add_definitions(-s) 14 | #add_definitions(-msse2) 15 | #add_definitions(-std=c++0x) 16 | #add_definitions(-fms-extensions) 17 | #add_definitions(-D_MSC_EXTENSIONS) 18 | #add_definitions(-m32) 19 | #add_definitions(-mfpmath=387) 20 | #add_definitions(-ffast-math) 21 | #add_definitions(-O3) 22 | 23 | #add_definitions(-fprofile-arcs -ftest-coverage) gcov 24 | #ctest_enable_coverage() 25 | endif() 26 | 27 | include_directories(".") 28 | include_directories("./test/external") 29 | 30 | add_subdirectory(glm) 31 | add_subdirectory(test) 32 | add_subdirectory(bench) 33 | add_subdirectory(doc) 34 | 35 | option(GLM_TEST_MODE "GLM test" OFF) 36 | if(NOT GLM_TEST_MODE) 37 | message(FATAL_ERROR "GLM is a header only library, no need to build it. Set the option GLM_TEST_MODE with ON to build and run the test bench") 38 | endif() 39 | 40 | install(DIRECTORY glm DESTINATION include) 41 | -------------------------------------------------------------------------------- /common/include/glm/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ## This file should be placed in the root directory of your project. 2 | ## Then modify the CMakeLists.txt file in the root directory of your 3 | ## project to incorporate the testing dashboard. 4 | ## # The following are required to uses Dart and the Cdash dashboard 5 | ## ENABLE_TESTING() 6 | ## INCLUDE(CTest) 7 | set(CTEST_PROJECT_NAME "GLM") 8 | set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") 9 | 10 | set(CTEST_DROP_METHOD "http") 11 | set(CTEST_DROP_SITE "my.cdash.org") 12 | set(CTEST_DROP_LOCATION "/submit.php?project=GLM") 13 | set(CTEST_DROP_SITE_CDASH TRUE) 14 | -------------------------------------------------------------------------------- /common/include/glm/bench/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | function(glmCreateBenchGTC NAME) 2 | set(SAMPLE_NAME bench-${NAME}) 3 | 4 | add_executable(${SAMPLE_NAME} ${NAME}.cpp) 5 | endfunction(glmCreateBenchGTC) 6 | 7 | add_subdirectory(core) 8 | add_subdirectory(gtc) 9 | add_subdirectory(gtx) 10 | 11 | 12 | -------------------------------------------------------------------------------- /common/include/glm/bench/core/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/bench/core/CMakeLists.txt -------------------------------------------------------------------------------- /common/include/glm/bench/gtc/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/bench/gtc/CMakeLists.txt -------------------------------------------------------------------------------- /common/include/glm/bench/gtx/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/bench/gtx/CMakeLists.txt -------------------------------------------------------------------------------- /common/include/glm/copying.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2005 - 2012 G-Truc Creation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /common/include/glm/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME glm-doc) 2 | 3 | file(GLOB ROOT_TXT *.doxy ../*.txt ./theme/*.css) 4 | file(GLOB ROOT_CPP src/*.cpp) 5 | file(GLOB ROOT_XML src/*.xml) 6 | file(GLOB ROOT_XSL src/*.xsl) 7 | 8 | source_group("TXT Files" FILES ${ROOT_TXT}) 9 | source_group("XML Files" FILES ${ROOT_XML}) 10 | source_group("XSL Files" FILES ${ROOT_XSL}) 11 | 12 | add_executable(${NAME} ${ROOT_CPP} ${ROOT_XML} ${ROOT_XSL} ${ROOT_TXT}) 13 | -------------------------------------------------------------------------------- /common/include/glm/doc/about.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/about.html -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00072_source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | pages.doxy Source File 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 | 49 |
50 |
51 |
pages.doxy
52 |
53 |
54 |
00001 
55 | 
56 |
57 | 58 | 59 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00127.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/a00127.html -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00130.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/a00130.html -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00142.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Template types 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 |
45 |
46 |
47 |
Template types
48 |
GLM Core
49 |
50 |

The generic template types used as the basis for the core types.

51 |

These types are all templates used to define the actual Types. These templetes are implementation details of GLM types and should not be used explicitly.

52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00200.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GLM_GTX_simd_mat4: SIMD mat4 type and functions 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 |
45 |
46 |
47 |
GLM_GTX_simd_mat4: SIMD mat4 type and functions
48 |
GTX Extensions (Experimental)
49 |
50 |

SIMD implementation of mat4 type.

51 |

<glm/gtx/simd_mat4.hpp> need to be included to use these functionalities.

52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00201.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GLM_GTX_simd_vec4: SIMD vec4 type and functions 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 |
45 |
46 |
47 |
GLM_GTX_simd_vec4: SIMD vec4 type and functions
48 |
GTX Extensions (Experimental)
49 |
50 |

SIMD implementation of vec4 type.

51 |

<glm/gtx/simd_vec4.hpp> need to be included to use these functionalities.

52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00208.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GLM_GTX_vec1: Add vec1 types 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 |
45 |
46 |
47 |
GLM_GTX_vec1: Add vec1 types
48 |
GTX Extensions (Experimental)
49 |
50 |

Add vec1, ivec1, uvec1 and bvec1 types.

51 |

<glm/gtx/vec1.hpp> need to be included to use these functionalities.

52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/a00214.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GLM_VIRTREV_xstream: xml like output 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 |
45 |
46 |
47 |
GLM_VIRTREV_xstream: xml like output
48 |
VIRTREV Extensions
49 |
50 |

Streaming vector and matrix in a xml way.

51 |

Include <glm/virtrev/xstream.hpp> for this functionality.

52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/background.jpg -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/bc_s.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/closed.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/doxygen.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/logo-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/logo-mini.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/nav_f.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/nav_h.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/open.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/pages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Related Pages 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 44 |
45 |
46 |
47 |
Related Pages
48 |
49 |
50 |
Here is a list of all related documentation pages:
56 |
57 | 58 | 59 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/tab_a.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/tab_b.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/tab_h.png -------------------------------------------------------------------------------- /common/include/glm/doc/api-0.9.3/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/api-0.9.3/tab_s.png -------------------------------------------------------------------------------- /common/include/glm/doc/code.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/code.html -------------------------------------------------------------------------------- /common/include/glm/doc/common/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/common/email.png -------------------------------------------------------------------------------- /common/include/glm/doc/common/g-truc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/common/g-truc.png -------------------------------------------------------------------------------- /common/include/glm/doc/common/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/common/logo.png -------------------------------------------------------------------------------- /common/include/glm/doc/common/opengl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/common/opengl.jpg -------------------------------------------------------------------------------- /common/include/glm/doc/common/sourceforge.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/common/sourceforge.gif -------------------------------------------------------------------------------- /common/include/glm/doc/common/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/common/title.png -------------------------------------------------------------------------------- /common/include/glm/doc/download.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/download.html -------------------------------------------------------------------------------- /common/include/glm/doc/glm-0.9.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/glm-0.9.3.pdf -------------------------------------------------------------------------------- /common/include/glm/doc/goodies.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies.html -------------------------------------------------------------------------------- /common/include/glm/doc/goodies/logo1024x0640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies/logo1024x0640.png -------------------------------------------------------------------------------- /common/include/glm/doc/goodies/logo1280x0800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies/logo1280x0800.png -------------------------------------------------------------------------------- /common/include/glm/doc/goodies/logo1600x1000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies/logo1600x1000.png -------------------------------------------------------------------------------- /common/include/glm/doc/goodies/logo1920x1200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies/logo1920x1200.png -------------------------------------------------------------------------------- /common/include/glm/doc/goodies/logo2560x1600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies/logo2560x1600.png -------------------------------------------------------------------------------- /common/include/glm/doc/goodies/tenby-five.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/goodies/tenby-five.otf -------------------------------------------------------------------------------- /common/include/glm/doc/image/0029-mini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/0029-mini.jpg -------------------------------------------------------------------------------- /common/include/glm/doc/image/0029.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/0029.jpg -------------------------------------------------------------------------------- /common/include/glm/doc/image/0075-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/0075-1.jpg -------------------------------------------------------------------------------- /common/include/glm/doc/image/0075-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/0075-2.jpg -------------------------------------------------------------------------------- /common/include/glm/doc/image/font-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/font-mini.png -------------------------------------------------------------------------------- /common/include/glm/doc/image/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/font.png -------------------------------------------------------------------------------- /common/include/glm/doc/image/logo-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/logo-mini.png -------------------------------------------------------------------------------- /common/include/glm/doc/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/image/logo.png -------------------------------------------------------------------------------- /common/include/glm/doc/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/index.html -------------------------------------------------------------------------------- /common/include/glm/doc/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | #include "../../glm/glm.hpp" // glm::vec3, glm::vec4, glm::ivec4, glm::mat4 2 | #include 3 | 4 | struct triangle 5 | { 6 | glm::vec3 Position[3]; 7 | glm::vec3 Normal; 8 | }; 9 | 10 | void computeNormal(triangle & Triangle) 11 | { 12 | glm::vec3 const & a = Triangle.Position[0]; 13 | glm::vec3 const & b = Triangle.Position[1]; 14 | glm::vec3 const & c = Triangle.Position[2]; 15 | Triangle.Normal = glm::normalize(glm::cross(c - a, b - a)); 16 | } 17 | 18 | #include "../../glm/gtc/matrix_transform.hpp" // glm::translate, glm::rotate, glm::scale 19 | #include "../../glm/gtc/type_ptr.hpp" // glm::value_ptr 20 | #include "../../glm/gtc/quaternion.hpp" // glm::quat 21 | //#include "../../glm/ext.hpp" 22 | 23 | glm::vec4 const ClearColor = glm::vec4(glm::vec3(0.0f), 1.0f); 24 | glm::ivec4 const Viewport = glm::ivec4(0, 0, 640, 480); 25 | 26 | void glUniformMatrix4fv(int location, int count, bool transpose, const float * value); 27 | 28 | void ticket0023() 29 | { 30 | std::vector vals; 31 | vals.push_back(1); 32 | vals.push_back(2); 33 | vals.push_back(3); 34 | std::vector::iterator it1, it2; 35 | it1 = vals.begin(); 36 | it2 = vals.end(); 37 | it1 != it2; // <-- Here 38 | glm::vec3 c; 39 | glm::quat q; 40 | } 41 | 42 | int main() 43 | { 44 | //triangle Triangle; 45 | //computeNormal(Triangle); 46 | 47 | float Translate = 1.0f; 48 | glm::vec2 Rotate; 49 | 50 | glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); 51 | glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); 52 | glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); 53 | glm::mat4 View = glm::rotate(ViewRotateX, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); 54 | glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); 55 | glm::mat4 MVP = Projection * View * Model; 56 | 57 | //glUniformMatrix4fv(LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP)); 58 | 59 | ticket0023(); 60 | } 61 | -------------------------------------------------------------------------------- /common/include/glm/doc/theme/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/doc/theme/background.jpg -------------------------------------------------------------------------------- /common/include/glm/glm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME glm) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | 7 | file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) 8 | file(GLOB_RECURSE CORE_INLINE ./core/*.inl) 9 | file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) 10 | 11 | file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) 12 | file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) 13 | file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) 14 | 15 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 16 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 17 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 18 | 19 | file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp) 20 | file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl) 21 | file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp) 22 | 23 | source_group("Core Files" FILES ${CORE_SOURCE}) 24 | source_group("Core Files" FILES ${CORE_INLINE}) 25 | source_group("Core Files" FILES ${CORE_HEADER}) 26 | source_group("GTC Files" FILES ${GTC_SOURCE}) 27 | source_group("GTC Files" FILES ${GTC_INLINE}) 28 | source_group("GTC Files" FILES ${GTC_HEADER}) 29 | source_group("GTX Files" FILES ${GTX_SOURCE}) 30 | source_group("GTX Files" FILES ${GTX_INLINE}) 31 | source_group("GTX Files" FILES ${GTX_HEADER}) 32 | source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE}) 33 | source_group("VIRTREV Files" FILES ${VIRTREV_INLINE}) 34 | source_group("VIRTREV Files" FILES ${VIRTREV_HEADER}) 35 | 36 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 37 | 38 | add_executable(${NAME} 39 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 40 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 41 | ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} 42 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} 43 | ${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER}) 44 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/_fixes.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/_fixes.hpp 25 | /// @date 2011-02-21 / 2011-11-22 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include 30 | 31 | //! Workaround for compatibility with other libraries 32 | #ifdef max 33 | #undef max 34 | #endif 35 | 36 | //! Workaround for compatibility with other libraries 37 | #ifdef min 38 | #undef min 39 | #endif 40 | 41 | //! Workaround for Android 42 | #ifdef isnan 43 | #undef isnan 44 | #endif 45 | 46 | //! Workaround for Android 47 | #ifdef isinf 48 | #undef isinf 49 | #endif 50 | 51 | //! Workaround for Chrone Native Client 52 | #ifdef log2 53 | #undef log2 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/dummy.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/dummy.cpp 25 | /// @date 2011-01-19 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /// 28 | /// GLM is a header only library. There is nothing to compile. 29 | /// dummy.cpp exist only a wordaround for CMake file. 30 | /////////////////////////////////////////////////////////////////////////////////// 31 | 32 | #define GLM_MESSAGES 33 | #include "../glm.hpp" 34 | #include "../ext.hpp" 35 | 36 | //#error "GLM is a header only library" 37 | 38 | int main() 39 | { 40 | 41 | } 42 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/func_common.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/core/func_common.hpp -------------------------------------------------------------------------------- /common/include/glm/glm/core/func_common.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/core/func_common.inl -------------------------------------------------------------------------------- /common/include/glm/glm/core/func_integer.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/core/func_integer.hpp -------------------------------------------------------------------------------- /common/include/glm/glm/core/hint.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/hint.hpp 25 | /// @date 2008-08-14 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_type 30 | #define glm_core_type 31 | 32 | namespace glm 33 | { 34 | // Use dont_care, nicest and fastest to optimize implementations. 35 | class dont_care {}; 36 | class nicest {}; 37 | class fastest {}; 38 | }//namespace glm 39 | 40 | #endif//glm_core_type 41 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/intrinsic_exponential.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_exponential.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/intrinsic_trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_trigonometric.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_trigonometric 30 | #define glm_detail_intrinsic_trigonometric 31 | 32 | #include "setup.hpp" 33 | 34 | #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | namespace glm{ 39 | namespace detail 40 | { 41 | 42 | }//namespace detail 43 | }//namespace glm 44 | 45 | #include "intrinsic_trigonometric.inl" 46 | 47 | #endif//GLM_ARCH 48 | #endif//glm_detail_intrinsic_trigonometric 49 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/intrinsic_trigonometric.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_trigonometric.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/intrinsic_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_vector_relational.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_vector_relational 30 | #define glm_detail_intrinsic_vector_relational 31 | 32 | #include "setup.hpp" 33 | 34 | #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | namespace glm{ 39 | namespace detail 40 | { 41 | 42 | }//namespace detail 43 | }//namespace glm 44 | 45 | #include "intrinsic_vector_relational.inl" 46 | 47 | #endif//GLM_ARCH 48 | #endif//glm_detail_intrinsic_vector_relational 49 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/type_half.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/core/type_half.inl -------------------------------------------------------------------------------- /common/include/glm/glm/core/type_mat.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_mat.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/type_size.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_size.hpp 25 | /// @date 2008-10-05 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_type_size 30 | #define glm_core_type_size 31 | 32 | #include 33 | 34 | namespace glm{ 35 | namespace detail 36 | { 37 | //typedef std::size_t size_t; 38 | typedef int sizeType; 39 | 40 | }//namespace detail 41 | }//namespace glm 42 | 43 | #endif//glm_core_type_size 44 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/type_vec.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_vec.hpp 25 | /// @date 2010-01-26 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_type_vec 30 | #define glm_core_type_vec 31 | 32 | #include "type_gentype.hpp" 33 | 34 | namespace glm{ 35 | namespace detail 36 | { 37 | 38 | }//namespace detail 39 | }//namespace glm 40 | 41 | #endif//glm_core_type_vec 42 | -------------------------------------------------------------------------------- /common/include/glm/glm/core/type_vec.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_vec.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_swizzle 24 | /// @file glm/gtc/swizzle.inl 25 | /// @date 2009-06-14 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | namespace glm 30 | { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-30 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/closest_point.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef glm_gtx_closest_point 11 | #define glm_gtx_closest_point 12 | 13 | namespace glm 14 | { 15 | template 16 | GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine 17 | ( 18 | detail::tvec3 const & point, 19 | detail::tvec3 const & a, 20 | detail::tvec3 const & b 21 | ) 22 | { 23 | valType LineLength = distance(a, b); 24 | detail::tvec3 Vector = point - a; 25 | detail::tvec3 LineDirection = (b - a) / LineLength; 26 | 27 | // Project Vector to LineDirection to get the distance of point from a 28 | valType Distance = dot(Vector, LineDirection); 29 | 30 | if(Distance <= valType(0)) return a; 31 | if(Distance >= LineLength) return b; 32 | return a + LineDirection * Distance; 33 | } 34 | }//namespace glm 35 | 36 | #endif//glm_gtx_closest_point 37 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/component_wise.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-21 5 | // Updated : 2010-02-12 6 | // Licence : This source is under MIT License 7 | // File : gtx_component_wise.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v) 14 | { 15 | typename genType::size_type result = typename genType::value_type(0); 16 | for(typename genType::size_type i = 0; i < v.length(); ++i) 17 | result += v[i]; 18 | return result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v) 23 | { 24 | typename genType::value_type result = typename genType::value_type(1); 25 | for(typename genType::size_type i = 0; i < v.length(); ++i) 26 | result *= v[i]; 27 | return result; 28 | } 29 | 30 | template 31 | GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v) 32 | { 33 | typename genType::value_type result = typename genType::value_type(v[0]); 34 | for(typename genType::size_type i = 1; i < v.length(); ++i) 35 | result = min(result, v[i]); 36 | return result; 37 | } 38 | 39 | template 40 | GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v) 41 | { 42 | typename genType::value_type result = typename genType::value_type(v[0]); 43 | for(typename genType::size_type i = 1; i < v.length(); ++i) 44 | result = max(result, v[i]); 45 | return result; 46 | } 47 | }//namespace glm 48 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2006-01-07 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/extend.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | genType extend 14 | ( 15 | genType const & Origin, 16 | genType const & Source, 17 | genType const & Distance 18 | ) 19 | { 20 | return Origin + (Source - Origin) * Distance; 21 | } 22 | 23 | template 24 | detail::tvec2 extend 25 | ( 26 | detail::tvec2 const & Origin, 27 | detail::tvec2 const & Source, 28 | valType const & Distance 29 | ) 30 | { 31 | return Origin + (Source - Origin) * Distance; 32 | } 33 | 34 | template 35 | detail::tvec3 extend 36 | ( 37 | detail::tvec3 const & Origin, 38 | detail::tvec3 const & Source, 39 | valType const & Distance 40 | ) 41 | { 42 | return Origin + (Source - Origin) * Distance; 43 | } 44 | 45 | template 46 | detail::tvec4 extend 47 | ( 48 | detail::tvec4 const & Origin, 49 | detail::tvec4 const & Source, 50 | valType const & Distance 51 | ) 52 | { 53 | return Origin + (Source - Origin) * Distance; 54 | } 55 | }//namespace glm 56 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2009-03-06 5 | // Updated : 2009-03-09 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/gradient_paint.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | valType radialGradient 14 | ( 15 | detail::tvec2 const & Center, 16 | valType const & Radius, 17 | detail::tvec2 const & Focal, 18 | detail::tvec2 const & Position 19 | ) 20 | { 21 | detail::tvec2 F = Focal - Center; 22 | detail::tvec2 D = Position - Focal; 23 | valType Radius2 = pow2(Radius); 24 | valType Fx2 = pow2(F.x); 25 | valType Fy2 = pow2(F.y); 26 | 27 | valType Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 28 | valType Denominator = Radius2 - (Fx2 + Fy2); 29 | return Numerator / Denominator; 30 | } 31 | 32 | template 33 | valType linearGradient 34 | ( 35 | detail::tvec2 const & Point0, 36 | detail::tvec2 const & Point1, 37 | detail::tvec2 const & Position 38 | ) 39 | { 40 | detail::tvec2 Dist = Point1 - Point0; 41 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-02-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/handed_coordinate_space.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER bool rightHanded 14 | ( 15 | detail::tvec3 const & tangent, 16 | detail::tvec3 const & binormal, 17 | detail::tvec3 const & normal 18 | ) 19 | { 20 | return dot(cross(normal, tangent), binormal) > T(0); 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER bool leftHanded 25 | ( 26 | detail::tvec3 const & tangent, 27 | detail::tvec3 const & binormal, 28 | detail::tvec3 const & normal 29 | ) 30 | { 31 | return dot(cross(normal, tangent), binormal) < T(0); 32 | } 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/int_10_10_10_2.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-07-07 5 | // Updated : 2010-07-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/int_10_10_10_2.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast 13 | ( 14 | glm::vec4 const & v 15 | ) 16 | { 17 | return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30); 18 | } 19 | }//namespace glm 20 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-10-24 5 | // Updated : 2008-10-24 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/log_base.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "../core/_vectorize.hpp" 11 | 12 | namespace glm 13 | { 14 | template 15 | GLM_FUNC_QUALIFIER genType log( 16 | genType const & x, 17 | genType const & base) 18 | { 19 | assert(x != genType(0)); 20 | 21 | return glm::log(x) / glm::log(base); 22 | } 23 | 24 | VECTORIZE_VEC_SCA(log) 25 | VECTORIZE_VEC_VEC(log) 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/matrix_cross_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 14 | ( 15 | detail::tvec3 const & x 16 | ) 17 | { 18 | detail::tmat3x3 Result(T(0)); 19 | Result[0][1] = x.z; 20 | Result[1][0] = -x.z; 21 | Result[0][2] = -x.y; 22 | Result[2][0] = x.y; 23 | Result[1][2] = x.x; 24 | Result[2][1] = -x.x; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 30 | ( 31 | detail::tvec3 const & x 32 | ) 33 | { 34 | detail::tmat4x4 Result(T(0)); 35 | Result[0][1] = x.z; 36 | Result[1][0] = -x.z; 37 | Result[0][2] = -x.y; 38 | Result[2][0] = x.y; 39 | Result[1][2] = x.x; 40 | Result[2][1] = -x.x; 41 | return Result; 42 | } 43 | 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-04-03 5 | // Updated : 2008-09-17 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/mixed_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER valType mixedProduct 14 | ( 15 | detail::tvec3 const & v1, 16 | detail::tvec3 const & v2, 17 | detail::tvec3 const & v3 18 | ) 19 | { 20 | return dot(cross(v1, v2), v3); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/noise.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 5 | // https://github.com/ashima/webgl-noise 6 | // Following Stefan Gustavson's paper "Simplex noise demystified": 7 | // http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // Created : 2011-04-21 10 | // Updated : 2011-04-21 11 | // Licence : This source is under MIT License 12 | // File : glm/gtx/noise.inl 13 | /////////////////////////////////////////////////////////////////////////////////////////////////// 14 | // Dependency: 15 | // - GLM core 16 | /////////////////////////////////////////////////////////////////////////////////////////////////// 17 | 18 | namespace glm{ 19 | 20 | }//namespace glm 21 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2011-06-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/normal.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal 14 | ( 15 | detail::tvec3 const & p1, 16 | detail::tvec3 const & p2, 17 | detail::tvec3 const & p3 18 | ) 19 | { 20 | return normalize(cross(p1 - p2, p1 - p3)); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-10 5 | // Updated : 2007-05-10 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/number_precision.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/ocl_type.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/gtx/ocl_type.inl -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-27 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/optimum_pow.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType pow2(const genType& x) 14 | { 15 | return x * x; 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER genType pow3(const genType& x) 20 | { 21 | return x * x * x; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER genType pow4(const genType& x) 26 | { 27 | return x * x * x * x; 28 | } 29 | 30 | GLM_FUNC_QUALIFIER bool powOfTwo(int x) 31 | { 32 | return !(x & (x - 1)); 33 | } 34 | 35 | GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(const detail::tvec2& x) 36 | { 37 | return detail::tvec2( 38 | powOfTwo(x.x), 39 | powOfTwo(x.y)); 40 | } 41 | 42 | GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(const detail::tvec3& x) 43 | { 44 | return detail::tvec3( 45 | powOfTwo(x.x), 46 | powOfTwo(x.y), 47 | powOfTwo(x.z)); 48 | } 49 | 50 | GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(const detail::tvec4& x) 51 | { 52 | return detail::tvec4( 53 | powOfTwo(x.x), 54 | powOfTwo(x.y), 55 | powOfTwo(x.z), 56 | powOfTwo(x.w)); 57 | } 58 | }//namespace glm 59 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/orthonormalize.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize 14 | ( 15 | const detail::tmat3x3& m 16 | ) 17 | { 18 | detail::tmat3x3 r = m; 19 | 20 | r[0] = normalize(r[0]); 21 | 22 | float d0 = dot(r[0], r[1]); 23 | r[1] -= r[0] * d0; 24 | r[1] = normalize(r[1]); 25 | 26 | float d1 = dot(r[1], r[2]); 27 | d0 = dot(r[0], r[2]); 28 | r[2] -= r[0] * d0 + r[1] * d1; 29 | r[2] = normalize(r[2]); 30 | 31 | return r; 32 | } 33 | 34 | template 35 | GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize 36 | ( 37 | const detail::tvec3& x, 38 | const detail::tvec3& y 39 | ) 40 | { 41 | return normalize(x - y * dot(y, x)); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/perpendicular.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType perp 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return x - proj(x, Normal); 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-03-06 5 | // Updated : 2009-05-01 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/polar_coordinates.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 polar 14 | ( 15 | detail::tvec3 const & euclidean 16 | ) 17 | { 18 | T length = length(euclidean); 19 | detail::tvec3 tmp = euclidean / length; 20 | T xz_dist = sqrt(tmp.x * tmp.x + tmp.z * tmp.z); 21 | 22 | return detail::tvec3( 23 | degrees(atan(xz_dist, tmp.y)), // latitude 24 | degrees(atan(tmp.x, tmp.z)), // longitude 25 | xz_dist); // xz distance 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tvec3 euclidean 30 | ( 31 | detail::tvec3 const & polar 32 | ) 33 | { 34 | T latitude = radians(polar.x); 35 | T longitude = radians(polar.y); 36 | return detail::tvec3( 37 | cos(latitude) * sin(longitude), 38 | sin(latitude), 39 | cos(latitude) * cos(longitude)); 40 | } 41 | 42 | }//namespace glm 43 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/projection.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType proj 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-11-19 5 | // Updated : 2008-11-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/raw_data.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // Dependency: 10 | // - GLM core 11 | /////////////////////////////////////////////////////////////////////////////////////////////////// 12 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/simd_vec4.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/gtx/simd_vec4.hpp -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-06-08 5 | // Updated : 2008-06-08 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/std_based_type.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/unsigned_int.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead") 26 | #endif 27 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/unsigned_int.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-24 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/unsigned_int.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/vec1.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/glm/gtx/vec1.inl -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/vector_access.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2006-01-16 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/vector_access.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER void set 14 | ( 15 | detail::tvec2& v, 16 | valType const & x, 17 | valType const & y 18 | ) 19 | { 20 | v.x = x; 21 | v.y = y; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER void set 26 | ( 27 | detail::tvec3& v, 28 | valType const & x, 29 | valType const & y, 30 | valType const & z 31 | ) 32 | { 33 | v.x = x; 34 | v.y = y; 35 | v.z = z; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER void set 40 | ( 41 | detail::tvec4& v, 42 | valType const & x, 43 | valType const & y, 44 | valType const & z, 45 | valType const & w 46 | ) 47 | { 48 | v.x = x; 49 | v.y = y; 50 | v.z = z; 51 | v.w = w; 52 | } 53 | }//namespace glm 54 | -------------------------------------------------------------------------------- /common/include/glm/glm/gtx/vector_angle.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-30 5 | // Updated : 2008-09-29 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/vector_angle.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER typename genType::value_type angle 14 | ( 15 | genType const & x, 16 | genType const & y 17 | ) 18 | { 19 | return degrees(acos(dot(x, y))); 20 | } 21 | 22 | //! \todo epsilon is hard coded to 0.01 23 | template 24 | GLM_FUNC_QUALIFIER valType orientedAngle 25 | ( 26 | detail::tvec2 const & x, 27 | detail::tvec2 const & y 28 | ) 29 | { 30 | valType Angle = glm::degrees(acos(dot(x, y))); 31 | detail::tvec2 TransformedVector = glm::rotate(x, Angle); 32 | if(all(equalEpsilon(y, TransformedVector, valType(0.01)))) 33 | return Angle; 34 | else 35 | return -Angle; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER valType orientedAngle 40 | ( 41 | detail::tvec3 const & x, 42 | detail::tvec3 const & y, 43 | detail::tvec3 const & ref 44 | ) 45 | { 46 | valType Angle = glm::degrees(glm::acos(glm::dot(x, y))); 47 | 48 | if(glm::dot(ref, glm::cross(x, y)) < valType(0)) 49 | return -Angle; 50 | else 51 | return Angle; 52 | } 53 | }//namespace glm 54 | -------------------------------------------------------------------------------- /common/include/glm/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | function(glmCreateTestGTC NAME) 2 | set(SAMPLE_NAME test-${NAME}) 3 | add_executable(${SAMPLE_NAME} ${NAME}.cpp) 4 | 5 | add_test( 6 | NAME ${SAMPLE_NAME} 7 | COMMAND $ ) 8 | endfunction() 9 | 10 | add_subdirectory(bug) 11 | add_subdirectory(core) 12 | add_subdirectory(gtc) 13 | add_subdirectory(gtx) 14 | 15 | 16 | -------------------------------------------------------------------------------- /common/include/glm/test/bug/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/common/include/glm/test/bug/CMakeLists.txt -------------------------------------------------------------------------------- /common/include/glm/test/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(core_type_float) 2 | glmCreateTestGTC(core_type_half) 3 | glmCreateTestGTC(core_type_int) 4 | glmCreateTestGTC(core_type_length) 5 | glmCreateTestGTC(core_type_mat2x2) 6 | glmCreateTestGTC(core_type_mat2x3) 7 | glmCreateTestGTC(core_type_mat2x4) 8 | glmCreateTestGTC(core_type_mat3x2) 9 | glmCreateTestGTC(core_type_mat3x3) 10 | glmCreateTestGTC(core_type_mat3x4) 11 | glmCreateTestGTC(core_type_mat4x2) 12 | glmCreateTestGTC(core_type_mat4x3) 13 | glmCreateTestGTC(core_type_mat4x4) 14 | glmCreateTestGTC(core_type_vec1) 15 | glmCreateTestGTC(core_type_vec2) 16 | glmCreateTestGTC(core_type_vec3) 17 | glmCreateTestGTC(core_type_vec4) 18 | glmCreateTestGTC(core_func_common) 19 | glmCreateTestGTC(core_func_exponential) 20 | glmCreateTestGTC(core_func_geometric) 21 | glmCreateTestGTC(core_func_integer) 22 | glmCreateTestGTC(core_func_matrix) 23 | glmCreateTestGTC(core_func_noise) 24 | glmCreateTestGTC(core_func_packing) 25 | glmCreateTestGTC(core_func_trigonometric) 26 | glmCreateTestGTC(core_func_vector_relational) 27 | glmCreateTestGTC(core_func_swizzle) 28 | glmCreateTestGTC(core_setup_message) 29 | glmCreateTestGTC(core_setup_precision) 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_exponential.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-01-15 5 | // Updated : 2011-09-13 6 | // Licence : This source is under MIT licence 7 | // File : test/core/func_exponential.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int main() 13 | { 14 | int Failed = 0; 15 | 16 | return Failed; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_geometric.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-01-15 5 | // Updated : 2011-11-14 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/func_geometric.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int test_reflect() 14 | { 15 | int Error = 0; 16 | 17 | { 18 | glm::vec2 A(1.0f,-1.0f); 19 | glm::vec2 B(0.0f, 1.0f); 20 | glm::vec2 C = glm::reflect(A, B); 21 | Error += C == glm::vec2(1.0, 1.0) ? 0 : 1; 22 | } 23 | 24 | { 25 | glm::dvec2 A(1.0f,-1.0f); 26 | glm::dvec2 B(0.0f, 1.0f); 27 | glm::dvec2 C = glm::reflect(A, B); 28 | Error += C == glm::dvec2(1.0, 1.0) ? 0 : 1; 29 | } 30 | 31 | return Error; 32 | } 33 | 34 | int test_refract() 35 | { 36 | int Error = 0; 37 | 38 | { 39 | float A(-1.0f); 40 | float B(1.0f); 41 | float C = glm::refract(A, B, 0.5f); 42 | Error += C == -1.0f ? 0 : 1; 43 | } 44 | 45 | { 46 | glm::vec2 A(0.0f,-1.0f); 47 | glm::vec2 B(0.0f, 1.0f); 48 | glm::vec2 C = glm::refract(A, B, 0.5f); 49 | Error += glm::all(glm::equalEpsilon(C, glm::vec2(0.0, -1.0), 0.0001f)) ? 0 : 1; 50 | } 51 | 52 | { 53 | glm::dvec2 A(0.0f,-1.0f); 54 | glm::dvec2 B(0.0f, 1.0f); 55 | glm::dvec2 C = glm::refract(A, B, 0.5); 56 | Error += C == glm::dvec2(0.0, -1.0) ? 0 : 1; 57 | } 58 | 59 | return Error; 60 | } 61 | 62 | int main() 63 | { 64 | int Error(0); 65 | 66 | Error += test_reflect(); 67 | Error += test_refract(); 68 | 69 | return Error; 70 | } 71 | 72 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_matrix.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-01-15 5 | // Updated : 2011-01-15 6 | // Licence : This source is under MIT licence 7 | // File : test/core/func_matrix.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int test_matrixCompMult() 13 | { 14 | 15 | 16 | return 0; 17 | } 18 | 19 | int test_outerProduct() 20 | { 21 | 22 | 23 | return 0; 24 | } 25 | 26 | int test_transpose() 27 | { 28 | 29 | 30 | return 0; 31 | } 32 | 33 | int test_determinant() 34 | { 35 | 36 | 37 | return 0; 38 | } 39 | 40 | int test_inverse() 41 | { 42 | int Failed(0); 43 | 44 | glm::mat4x4 A4x4( 45 | glm::vec4(1, 0, 1, 0), 46 | glm::vec4(0, 1, 0, 0), 47 | glm::vec4(0, 0, 1, 0), 48 | glm::vec4(0, 0, 0, 1)); 49 | glm::mat4x4 B4x4 = glm::inverse(A4x4); 50 | glm::mat4x4 I4x4 = A4x4 * B4x4; 51 | Failed += I4x4 == glm::mat4x4(1) ? 0 : 1; 52 | 53 | glm::mat3x3 A3x3( 54 | glm::vec3(1, 0, 1), 55 | glm::vec3(0, 1, 0), 56 | glm::vec3(0, 0, 1)); 57 | glm::mat3x3 B3x3 = glm::inverse(A3x3); 58 | glm::mat3x3 I3x3 = A3x3 * B3x3; 59 | Failed += I3x3 == glm::mat3x3(1) ? 0 : 1; 60 | 61 | glm::mat2x2 A2x2( 62 | glm::vec2(1, 1), 63 | glm::vec2(0, 1)); 64 | glm::mat2x2 B2x2 = glm::inverse(A2x2); 65 | glm::mat2x2 I2x2 = A2x2 * B2x2; 66 | Failed += I2x2 == glm::mat2x2(1) ? 0 : 1; 67 | 68 | return Failed; 69 | } 70 | 71 | 72 | int main() 73 | { 74 | int Failed = 0; 75 | Failed += test_matrixCompMult(); 76 | Failed += test_outerProduct(); 77 | Failed += test_transpose(); 78 | Failed += test_determinant(); 79 | Failed += test_inverse(); 80 | return Failed; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_noise.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-01-15 5 | // Updated : 2011-09-13 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/func_noise.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int main() 13 | { 14 | int Failed = 0; 15 | 16 | return Failed; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_swizzle.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-10-16 5 | // Updated : 2011-10-16 6 | // Licence : This source is under MIT License 7 | // File : test/core/core_func_swizzle.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_FORCE_ONLY_XYZW 11 | //#define GLM_FORCE_PURE 12 | #define GLM_MESSAGES 13 | #define GLM_SWIZZLE 14 | #define GLM_FORCE_CXX98 15 | #include 16 | 17 | int test_vec2_swizzle() 18 | { 19 | int Error = 0; 20 | 21 | glm::ivec2 A(1, 2); 22 | glm::ivec2 B = A.xy(); 23 | glm::ivec2 C(0); 24 | C.xy() = B.xy(); 25 | 26 | Error += A == B ? 0 : 1; 27 | Error += A == C ? 0 : 1; 28 | 29 | return Error; 30 | } 31 | 32 | int test_vec3_swizzle() 33 | { 34 | int Error = 0; 35 | 36 | glm::ivec3 A(1, 2, 3); 37 | glm::ivec3 B = A.xyz(); 38 | glm::ivec3 C(0); 39 | C.xyz() = B.xyz(); 40 | 41 | Error += A == B ? 0 : 1; 42 | Error += A == C ? 0 : 1; 43 | 44 | return Error; 45 | } 46 | 47 | int test_vec4_swizzle() 48 | { 49 | int Error = 0; 50 | 51 | glm::ivec4 A(1, 2, 3, 4); 52 | glm::ivec4 B = A.xyzw(); 53 | glm::ivec4 C(0); 54 | C.xyzw() = B.xyzw(); 55 | 56 | Error += A == B ? 0 : 1; 57 | Error += A == C ? 0 : 1; 58 | 59 | return Error; 60 | } 61 | 62 | int main() 63 | { 64 | int Error = 0; 65 | 66 | Error += test_vec2_swizzle(); 67 | Error += test_vec3_swizzle(); 68 | Error += test_vec4_swizzle(); 69 | 70 | return Error; 71 | } 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_trigonometric.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-01-15 5 | // Updated : 2011-09-13 6 | // Licence : This source is under MIT licence 7 | // File : test/core/func_trigonometric.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int main() 13 | { 14 | int Failed = 0; 15 | 16 | return Failed; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_func_vector_relational.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-01-15 5 | // Updated : 2011-09-13 6 | // Licence : This source is under MIT licence 7 | // File : test/core/vector_relational.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int main() 13 | { 14 | int Failed = 0; 15 | 16 | return Failed; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_setup_precision.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-05-31 5 | // Updated : 2011-05-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/setup_precision_highp.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_PRECISION_HIGHP_FLOAT 11 | #include 12 | 13 | static int test_mat() 14 | { 15 | int Error = 0; 16 | 17 | Error += sizeof(glm::mat2) == sizeof(glm::highp_mat2) ? 0 : 1; 18 | Error += sizeof(glm::mat3) == sizeof(glm::highp_mat3) ? 0 : 1; 19 | Error += sizeof(glm::mat4) == sizeof(glm::highp_mat4) ? 0 : 1; 20 | 21 | Error += sizeof(glm::mat2x2) == sizeof(glm::highp_mat2x2) ? 0 : 1; 22 | Error += sizeof(glm::mat2x3) == sizeof(glm::highp_mat2x3) ? 0 : 1; 23 | Error += sizeof(glm::mat2x4) == sizeof(glm::highp_mat2x4) ? 0 : 1; 24 | Error += sizeof(glm::mat3x2) == sizeof(glm::highp_mat3x2) ? 0 : 1; 25 | Error += sizeof(glm::mat3x3) == sizeof(glm::highp_mat3x3) ? 0 : 1; 26 | Error += sizeof(glm::mat3x4) == sizeof(glm::highp_mat3x4) ? 0 : 1; 27 | Error += sizeof(glm::mat4x2) == sizeof(glm::highp_mat4x2) ? 0 : 1; 28 | Error += sizeof(glm::mat4x3) == sizeof(glm::highp_mat4x3) ? 0 : 1; 29 | Error += sizeof(glm::mat4x4) == sizeof(glm::highp_mat4x4) ? 0 : 1; 30 | 31 | return Error; 32 | } 33 | 34 | static int test_vec() 35 | { 36 | int Error = 0; 37 | 38 | Error += sizeof(glm::vec2) == sizeof(glm::highp_vec2) ? 0 : 1; 39 | Error += sizeof(glm::vec3) == sizeof(glm::highp_vec3) ? 0 : 1; 40 | Error += sizeof(glm::vec4) == sizeof(glm::highp_vec4) ? 0 : 1; 41 | 42 | return Error; 43 | } 44 | 45 | int main() 46 | { 47 | int Error = 0; 48 | 49 | Error += test_mat(); 50 | Error += test_vec(); 51 | 52 | return Error; 53 | } 54 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_float.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2011-05-06 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_float.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int test_float_size() 13 | { 14 | return 15 | sizeof(glm::float_t) != sizeof(glm::lowp_float) && 16 | sizeof(glm::float_t) != sizeof(glm::mediump_float) && 17 | sizeof(glm::float_t) != sizeof(glm::highp_float); 18 | } 19 | 20 | int test_float_precision() 21 | { 22 | return ( 23 | sizeof(glm::lowp_float) <= sizeof(glm::mediump_float) && 24 | sizeof(glm::mediump_float) <= sizeof(glm::highp_float)) ? 0 : 1; 25 | } 26 | 27 | int test_vec2() 28 | { 29 | return 0; 30 | } 31 | 32 | int main() 33 | { 34 | int Error = 0; 35 | 36 | Error += test_float_size(); 37 | Error += test_float_precision(); 38 | 39 | return Error; 40 | } 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_int.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2011-05-06 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_int.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | int test_int_size() 13 | { 14 | return 15 | sizeof(glm::int_t) != sizeof(glm::lowp_int) && 16 | sizeof(glm::int_t) != sizeof(glm::mediump_int) && 17 | sizeof(glm::int_t) != sizeof(glm::highp_int); 18 | } 19 | 20 | int test_uint_size() 21 | { 22 | return 23 | sizeof(glm::uint_t) != sizeof(glm::lowp_uint) && 24 | sizeof(glm::uint_t) != sizeof(glm::mediump_uint) && 25 | sizeof(glm::uint_t) != sizeof(glm::highp_uint); 26 | } 27 | 28 | int test_int_precision() 29 | { 30 | return ( 31 | sizeof(glm::lowp_int) <= sizeof(glm::mediump_int) && 32 | sizeof(glm::mediump_int) <= sizeof(glm::highp_int)) ? 0 : 1; 33 | } 34 | 35 | int test_uint_precision() 36 | { 37 | return ( 38 | sizeof(glm::lowp_uint) <= sizeof(glm::mediump_uint) && 39 | sizeof(glm::mediump_uint) <= sizeof(glm::highp_uint)) ? 0 : 1; 40 | } 41 | 42 | int main() 43 | { 44 | int Error = 0; 45 | 46 | Error += test_int_size(); 47 | Error += test_int_precision(); 48 | Error += test_uint_size(); 49 | Error += test_uint_precision(); 50 | 51 | return Error; 52 | } 53 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat2x2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat2x2.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static int test_operators() 13 | { 14 | glm::mat2x2 l(1.0f); 15 | glm::mat2x2 m(1.0f); 16 | glm::vec2 u(1.0f); 17 | glm::vec2 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec2 a = m * u; 20 | glm::vec2 b = v * m; 21 | glm::mat2x2 n = x / m; 22 | glm::mat2x2 o = m / x; 23 | glm::mat2x2 p = x * m; 24 | glm::mat2x2 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat2x3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat2x3.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static int test_operators() 13 | { 14 | glm::mat2x3 l(1.0f); 15 | glm::mat2x3 m(1.0f); 16 | glm::vec2 u(1.0f); 17 | glm::vec3 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec3 a = m * u; 20 | glm::vec2 b = v * m; 21 | glm::mat2x3 n = x / m; 22 | glm::mat2x3 o = m / x; 23 | glm::mat2x3 p = x * m; 24 | glm::mat2x3 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat2x4.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat2x4.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static int test_operators() 13 | { 14 | glm::mat2x4 l(1.0f); 15 | glm::mat2x4 m(1.0f); 16 | glm::vec2 u(1.0f); 17 | glm::vec4 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec4 a = m * u; 20 | glm::vec2 b = v * m; 21 | glm::mat2x4 n = x / m; 22 | glm::mat2x4 o = m / x; 23 | glm::mat2x4 p = x * m; 24 | glm::mat2x4 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat3x2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat3x2.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static bool test_operators() 13 | { 14 | glm::mat3x2 l(1.0f); 15 | glm::mat3x2 m(1.0f); 16 | glm::vec3 u(1.0f); 17 | glm::vec2 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec2 a = m * u; 20 | glm::vec3 b = v * m; 21 | glm::mat3x2 n = x / m; 22 | glm::mat3x2 o = m / x; 23 | glm::mat3x2 p = x * m; 24 | glm::mat3x2 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat3x3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat3x3.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | void print(glm::dmat3 const & Mat0) 14 | { 15 | printf("mat3(\n"); 16 | printf("\tvec3(%2.3f, %2.3f, %2.3f)\n", Mat0[0][0], Mat0[0][1], Mat0[0][2]); 17 | printf("\tvec3(%2.3f, %2.3f, %2.3f)\n", Mat0[1][0], Mat0[1][1], Mat0[1][2]); 18 | printf("\tvec3(%2.3f, %2.3f, %2.3f))\n\n", Mat0[2][0], Mat0[2][1], Mat0[2][2]); 19 | } 20 | 21 | int test_mat3x3() 22 | { 23 | glm::dmat3 Mat0( 24 | glm::dvec3(0.6f, 0.2f, 0.3f), 25 | glm::dvec3(0.2f, 0.7f, 0.5f), 26 | glm::dvec3(0.3f, 0.5f, 0.7f)); 27 | glm::dmat3 Inv0 = glm::inverse(Mat0); 28 | glm::dmat3 Res0 = Mat0 * Inv0; 29 | 30 | print(Mat0); 31 | print(Inv0); 32 | print(Res0); 33 | 34 | return 0; 35 | } 36 | 37 | static int test_operators() 38 | { 39 | glm::mat3x3 l(1.0f); 40 | glm::mat3x3 m(1.0f); 41 | glm::vec3 u(1.0f); 42 | glm::vec3 v(1.0f); 43 | float x = 1.0f; 44 | glm::vec3 a = m * u; 45 | glm::vec3 b = v * m; 46 | glm::mat3x3 n = x / m; 47 | glm::mat3x3 o = m / x; 48 | glm::mat3x3 p = x * m; 49 | glm::mat3x3 q = m * x; 50 | bool R = m != q; 51 | bool S = m == l; 52 | 53 | return (S && !R) ? 0 : 1; 54 | } 55 | 56 | int main() 57 | { 58 | int Error = 0; 59 | 60 | Error += test_mat3x3(); 61 | Error += test_operators(); 62 | 63 | return Error; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat3x4.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat3x4.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static bool test_operators() 13 | { 14 | glm::mat3x4 l(1.0f); 15 | glm::mat3x4 m(1.0f); 16 | glm::vec3 u(1.0f); 17 | glm::vec4 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec4 a = m * u; 20 | glm::vec3 b = v * m; 21 | glm::mat3x4 n = x / m; 22 | glm::mat3x4 o = m / x; 23 | glm::mat3x4 p = x * m; 24 | glm::mat3x4 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat4x2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat4x2.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static int test_operators() 13 | { 14 | glm::mat4x2 l(1.0f); 15 | glm::mat4x2 m(1.0f); 16 | glm::vec4 u(1.0f); 17 | glm::vec2 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec2 a = m * u; 20 | glm::vec4 b = v * m; 21 | glm::mat4x2 n = x / m; 22 | glm::mat4x2 o = m / x; 23 | glm::mat4x2 p = x * m; 24 | glm::mat4x2 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat4x3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat4x3.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | 12 | static int test_operators() 13 | { 14 | glm::mat4x3 l(1.0f); 15 | glm::mat4x3 m(1.0f); 16 | glm::vec4 u(1.0f); 17 | glm::vec3 v(1.0f); 18 | float x = 1.0f; 19 | glm::vec3 a = m * u; 20 | glm::vec4 b = v * m; 21 | glm::mat4x3 n = x / m; 22 | glm::mat4x3 o = m / x; 23 | glm::mat4x3 p = x * m; 24 | glm::mat4x3 q = m * x; 25 | bool R = m != q; 26 | bool S = m == l; 27 | 28 | return (S && !R) ? 0 : 1; 29 | } 30 | 31 | int main() 32 | { 33 | int Error = 0; 34 | 35 | Error += test_operators(); 36 | 37 | return Error; 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_mat4x4.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_mat4x4.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_PRECISION_HIGHP_FLOAT 11 | #include 12 | #include 13 | 14 | void print(glm::dmat4 const & Mat0) 15 | { 16 | printf("mat4(\n"); 17 | printf("\tvec4(%2.3f, %2.3f, %2.3f, %2.3f)\n", Mat0[0][0], Mat0[0][1], Mat0[0][2], Mat0[0][3]); 18 | printf("\tvec4(%2.3f, %2.3f, %2.3f, %2.3f)\n", Mat0[1][0], Mat0[1][1], Mat0[1][2], Mat0[1][3]); 19 | printf("\tvec4(%2.3f, %2.3f, %2.3f, %2.3f)\n", Mat0[2][0], Mat0[2][1], Mat0[2][2], Mat0[2][3]); 20 | printf("\tvec4(%2.3f, %2.3f, %2.3f, %2.3f))\n\n", Mat0[3][0], Mat0[3][1], Mat0[3][2], Mat0[3][3]); 21 | } 22 | 23 | int test_mat4x4() 24 | { 25 | glm::dmat4 Mat0( 26 | glm::dvec4(0.6f, 0.2f, 0.3f, 0.4f), 27 | glm::dvec4(0.2f, 0.7f, 0.5f, 0.3f), 28 | glm::dvec4(0.3f, 0.5f, 0.7f, 0.2f), 29 | glm::dvec4(0.4f, 0.3f, 0.2f, 0.6f)); 30 | glm::dmat4 Inv0 = glm::inverse(Mat0); 31 | glm::dmat4 Res0 = Mat0 * Inv0; 32 | 33 | print(Mat0); 34 | print(Inv0); 35 | print(Res0); 36 | 37 | return 0; 38 | } 39 | 40 | static bool test_operators() 41 | { 42 | glm::mat4x4 l(1.0f); 43 | glm::mat4x4 m(1.0f); 44 | glm::vec4 u(1.0f); 45 | glm::vec4 v(1.0f); 46 | float x = 1.0f; 47 | glm::vec4 a = m * u; 48 | glm::vec4 b = v * m; 49 | glm::mat4x4 n = x / m; 50 | glm::mat4x4 o = m / x; 51 | glm::mat4x4 p = x * m; 52 | glm::mat4x4 q = m * x; 53 | bool R = m != q; 54 | bool S = m == l; 55 | 56 | return (S && !R) ? 0 : 1; 57 | } 58 | 59 | int main() 60 | { 61 | int Error = 0; 62 | 63 | Error += test_mat4x4(); 64 | Error += test_operators(); 65 | 66 | return Error; 67 | } 68 | -------------------------------------------------------------------------------- /common/include/glm/test/core/core_type_vec1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-08-31 5 | // Updated : 2008-08-31 6 | // Licence : This source is under MIT License 7 | // File : test/core/type_vec1.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_SWIZZLE 11 | #include 12 | 13 | static int test_operators() 14 | { 15 | glm::vec4 A(1.0f); 16 | glm::vec4 B(1.0f); 17 | bool R = A != B; 18 | bool S = A == B; 19 | 20 | return (S && !R) ? 0 : 1; 21 | } 22 | 23 | int main() 24 | { 25 | int Error = 0; 26 | 27 | Error += test_operators(); 28 | 29 | return Error; 30 | } 31 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME gli) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | 7 | file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) 8 | file(GLOB_RECURSE CORE_INLINE ./core/*.inl) 9 | file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) 10 | 11 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 12 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 13 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 14 | 15 | source_group("Core Files" FILES ${CORE_SOURCE}) 16 | source_group("Core Files" FILES ${CORE_INLINE}) 17 | source_group("Core Files" FILES ${CORE_HEADER}) 18 | source_group("GTX Files" FILES ${GTX_SOURCE}) 19 | source_group("GTX Files" FILES ${GTX_INLINE}) 20 | source_group("GTX Files" FILES ${GTX_HEADER}) 21 | 22 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 23 | 24 | add_executable(${NAME} 25 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 26 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 27 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} ) 28 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/dummy.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/generate_mipmaps.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-27 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/core/generate_mipmaps.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GENERATE_MIPMAPS_INCLUDED 11 | #define GLI_GENERATE_MIPMAPS_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | texture2D generateMipmaps( 18 | texture2D const & Texture, 19 | texture2D::level_type const & BaseLevel); 20 | 21 | }//namespace gli 22 | 23 | #include "generate_mipmaps.inl" 24 | 25 | #endif//GLI_GENERATE_MIPMAPS_INCLUDED 26 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/operator.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-19 5 | // Updated : 2010-01-19 6 | // Licence : This source is under MIT License 7 | // File : gli/core/operator.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_OPERATOR_INCLUDED 11 | #define GLI_OPERATOR_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli{ 16 | namespace detail 17 | { 18 | 19 | }//namespace detail 20 | 21 | texture2D operator+(texture2D const & TextureA, texture2D const & TextureB); 22 | texture2D operator-(texture2D const & TextureA, texture2D const & TextureB); 23 | 24 | }//namespace gli 25 | 26 | #include "operator.inl" 27 | 28 | #endif//GLI_OPERATOR_INCLUDED 29 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/shared_array.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2005-06-13 6 | // Licence : This source is under MIT License 7 | // File : gli/shared_array.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_SHARED_ARRAY_INCLUDED 11 | #define GLI_SHARED_ARRAY_INCLUDED 12 | 13 | namespace gli 14 | { 15 | template 16 | class shared_array 17 | { 18 | public: 19 | 20 | shared_array(); 21 | shared_array(shared_array const & SharedArray); 22 | shared_array(T * Pointer); 23 | virtual ~shared_array(); 24 | 25 | void reset(); 26 | void reset(T * Pointer); 27 | 28 | T & operator*(); 29 | T * operator->(); 30 | T const & operator*() const; 31 | T const * const operator->() const; 32 | 33 | T * get(); 34 | T const * const get() const; 35 | 36 | shared_array & operator=(shared_array const & SharedArray); 37 | bool operator==(shared_array const & SharedArray) const; 38 | bool operator!=(shared_array const & SharedArray) const; 39 | 40 | private: 41 | int * Counter; 42 | T * Pointer; 43 | }; 44 | }//namespace gli 45 | 46 | #include "shared_array.inl" 47 | 48 | #endif //GLI_SHARED_ARRAY_INCLUDED 49 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/shared_ptr.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2005-06-13 6 | // Licence : This source is under MIT License 7 | // File : gli/fetch.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_SHARED_PTR_INCLUDED 11 | #define GLI_SHARED_PTR_INCLUDED 12 | 13 | namespace gli 14 | { 15 | template 16 | class shared_ptr 17 | { 18 | public: 19 | shared_ptr(); 20 | shared_ptr(shared_ptr const & SmartPtr); 21 | shared_ptr(T* pPointer); 22 | ~shared_ptr(); 23 | 24 | T& operator*(); 25 | T* operator->(); 26 | const T& operator*() const; 27 | const T* operator->() const; 28 | shared_ptr& operator=(shared_ptr const & SmartPtr); 29 | shared_ptr& operator=(T* pPointer); 30 | bool operator==(shared_ptr const & SmartPtr) const; 31 | bool operator!=(shared_ptr const & SmartPtr) const; 32 | 33 | private: 34 | int* m_pReference; 35 | T* m_pPointer; 36 | }; 37 | }//namespace gli 38 | 39 | #include "shared_ptr.inl" 40 | 41 | #endif //GLI_SHARED_PTR_INCLUDED 42 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/size.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-08 6 | // Licence : This source is under MIT License 7 | // File : gli/core/size.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_CORE_SIZE_INCLUDED 11 | #define GLI_CORE_SIZE_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | //template 18 | image2D::size_type size( 19 | image2D const & Image, 20 | image2D::size_type const & SizeType); 21 | 22 | //template 23 | texture2D::size_type size( 24 | texture2D const & Texture, 25 | texture2D::size_type const & SizeType); 26 | 27 | }//namespace gli 28 | 29 | #include "size.inl" 30 | 31 | #endif//GLI_CORE_SIZE_INCLUDED 32 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/size.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-09-08 6 | // Licence : This source is under MIT License 7 | // File : gli/core/size.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace gli 11 | { 12 | inline image2D::size_type size 13 | ( 14 | image2D const & Image, 15 | image2D::size_type const & SizeType 16 | ) 17 | { 18 | switch(SizeType) 19 | { 20 | case LINEAR_SIZE: 21 | return detail::sizeLinear(Image); 22 | case BLOCK_SIZE: 23 | return detail::sizeBlock(Image.format()); 24 | case BIT_PER_PIXEL: 25 | return detail::sizeBitPerPixel(Image.format()); 26 | case COMPONENT: 27 | return detail::sizeComponent(Image.format()); 28 | default: 29 | assert(0); 30 | return 0; 31 | }; 32 | } 33 | 34 | inline texture2D::size_type size 35 | ( 36 | texture2D const & Texture, 37 | texture2D::size_type const & SizeType 38 | ) 39 | { 40 | texture2D::size_type Size = 0; 41 | for(texture2D::level_type Level = 0; Level < Texture.levels(); ++Level) 42 | Size += size(Texture[Level], SizeType); 43 | 44 | return Size; 45 | } 46 | 47 | }//namespace 48 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/texture2d_array.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-04-06 5 | // Updated : 2011-04-06 6 | // Licence : This source is under MIT License 7 | // File : gli/core/texture2d_array.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_CORE_TEXTURE2D_ARRAY_INCLUDED 11 | #define GLI_CORE_TEXTURE2D_ARRAY_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | class texture2DArray 18 | { 19 | public: 20 | typedef texture2D::dimensions_type dimensions_type; 21 | typedef texture2D::texcoord_type texcoord_type; 22 | typedef texture2D::size_type size_type; 23 | typedef texture2D::value_type value_type; 24 | typedef texture2D::format_type format_type; 25 | typedef texture2D::data_type data_type; 26 | typedef texture2D::level_type level_type; 27 | typedef std::vector::size_type layer_type; 28 | 29 | public: 30 | texture2DArray(); 31 | 32 | explicit texture2DArray( 33 | layer_type const & Layers, 34 | level_type const & Levels); 35 | 36 | ~texture2DArray(); 37 | 38 | texture2D & operator[] ( 39 | layer_type const & Layer); 40 | texture2D const & operator[] ( 41 | layer_type const & Layer) const; 42 | 43 | bool empty() const; 44 | format_type format() const; 45 | layer_type layers() const; 46 | level_type levels() const; 47 | void resize( 48 | layer_type const & Layers, 49 | level_type const & Levels); 50 | 51 | private: 52 | std::vector Arrays; 53 | }; 54 | 55 | }//namespace gli 56 | 57 | #include "texture2d_array.inl" 58 | 59 | #endif//GLI_CORE_TEXTURE2D_ARRAY_INCLUDED 60 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/texture_cube.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-04-06 5 | // Updated : 2011-04-06 6 | // Licence : This source is under MIT License 7 | // File : gli/core/texture_cube.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_CORE_TEXTURE_CUBE_INCLUDED 11 | #define GLI_CORE_TEXTURE_CUBE_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | enum face 18 | { 19 | POSITIVE_X, 20 | NEGATIVE_X, 21 | POSITIVE_Y, 22 | NEGATIVE_Y, 23 | POSITIVE_Z, 24 | NEGATIVE_Z, 25 | FACE_MAX 26 | }; 27 | 28 | class textureCube 29 | { 30 | public: 31 | typedef texture2D::dimensions_type dimensions_type; 32 | typedef texture2D::texcoord_type texcoord_type; 33 | typedef texture2D::size_type size_type; 34 | typedef texture2D::value_type value_type; 35 | typedef texture2D::format_type format_type; 36 | typedef texture2D::data_type data_type; 37 | typedef texture2D::level_type level_type; 38 | typedef face face_type; 39 | 40 | public: 41 | textureCube(); 42 | 43 | explicit textureCube(level_type const & Levels); 44 | 45 | ~textureCube(); 46 | 47 | texture2D & operator[] ( 48 | face_type const & Face); 49 | texture2D const & operator[] ( 50 | face_type const & Face) const; 51 | 52 | bool empty() const; 53 | format_type format() const; 54 | level_type levels() const; 55 | void resize(level_type const & Levels); 56 | 57 | private: 58 | std::vector Faces; 59 | }; 60 | 61 | }//namespace gli 62 | 63 | #include "texture_cube.inl" 64 | 65 | #endif//GLI_CORE_TEXTURE_CUBE_INCLUDED 66 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/texture_cube.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-04-06 5 | // Updated : 2011-04-06 6 | // Licence : This source is under MIT License 7 | // File : gli/core/texture_cube.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace gli 11 | { 12 | inline textureCube::textureCube() 13 | {} 14 | 15 | inline textureCube::textureCube 16 | ( 17 | level_type const & Levels 18 | ) 19 | { 20 | this->Faces.resize(FACE_MAX); 21 | for(textureCube::size_type i = 0; i < FACE_MAX; ++i) 22 | this->Faces[i].resize(Levels); 23 | } 24 | 25 | inline textureCube::~textureCube() 26 | {} 27 | 28 | inline texture2D & textureCube::operator[] 29 | ( 30 | face_type const & Face 31 | ) 32 | { 33 | return this->Faces[Face]; 34 | } 35 | 36 | inline texture2D const & textureCube::operator[] 37 | ( 38 | face_type const & Face 39 | ) const 40 | { 41 | return this->Faces[Face]; 42 | } 43 | 44 | inline bool textureCube::empty() const 45 | { 46 | return this->Faces.size() == 0; 47 | } 48 | 49 | inline textureCube::format_type textureCube::format() const 50 | { 51 | return this->Faces.empty() ? FORMAT_NULL : this->Faces[0].format(); 52 | } 53 | 54 | inline textureCube::level_type textureCube::levels() const 55 | { 56 | if(this->empty()) 57 | return 0; 58 | return this->Faces[POSITIVE_X].levels(); 59 | } 60 | 61 | inline void textureCube::resize 62 | ( 63 | level_type const & Levels 64 | ) 65 | { 66 | for(textureCube::size_type i = 0; i < FACE_MAX; ++i) 67 | this->Faces[i].resize(Levels); 68 | } 69 | 70 | }//namespace gli 71 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/texture_cube_array.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-04-06 5 | // Updated : 2011-04-06 6 | // Licence : This source is under MIT License 7 | // File : gli/core/texture_cube_array.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_CORE_TEXTURE_CUBE_ARRAY_INCLUDED 11 | #define GLI_CORE_TEXTURE_CUBE_ARRAY_INCLUDED 12 | 13 | #include "texture_cube.hpp" 14 | 15 | namespace gli 16 | { 17 | class textureCubeArray 18 | { 19 | public: 20 | typedef textureCube::dimensions_type dimensions_type; 21 | typedef textureCube::texcoord_type texcoord_type; 22 | typedef textureCube::size_type size_type; 23 | typedef textureCube::value_type value_type; 24 | typedef textureCube::format_type format_type; 25 | typedef std::vector data_type; 26 | typedef textureCube::level_type level_type; 27 | typedef data_type::size_type layer_type; 28 | 29 | public: 30 | textureCubeArray(); 31 | 32 | explicit textureCubeArray( 33 | layer_type const & Layers, 34 | level_type const & Levels); 35 | 36 | ~textureCubeArray(); 37 | 38 | textureCube & operator[] ( 39 | layer_type const & Layer); 40 | textureCube const & operator[] ( 41 | layer_type const & Layer) const; 42 | 43 | bool empty() const; 44 | format_type format() const; 45 | layer_type layers() const; 46 | level_type levels() const; 47 | void resize( 48 | layer_type const & Layers, 49 | level_type const & Levels); 50 | 51 | private: 52 | data_type Arrays; 53 | }; 54 | 55 | }//namespace gli 56 | 57 | #include "texture_cube_array.inl" 58 | 59 | #endif//GLI_CORE_TEXTURE_CUBE_ARRAY_INCLUDED 60 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/core/texture_cube_array.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-04-06 5 | // Updated : 2011-04-06 6 | // Licence : This source is under MIT License 7 | // File : gli/core/texture_cube_array.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace gli 11 | { 12 | inline textureCubeArray::textureCubeArray() 13 | {} 14 | 15 | inline textureCubeArray::textureCubeArray 16 | ( 17 | layer_type const & Layers, 18 | level_type const & Levels 19 | ) 20 | { 21 | this->Arrays.resize(Layers); 22 | for(textureCubeArray::size_type i = 0; i < this->Arrays.size(); ++i) 23 | this->Arrays[i].resize(Levels); 24 | } 25 | 26 | inline textureCubeArray::~textureCubeArray() 27 | {} 28 | 29 | inline textureCube & textureCubeArray::operator[] 30 | ( 31 | layer_type const & Layer 32 | ) 33 | { 34 | return this->Arrays[Layer]; 35 | } 36 | 37 | inline textureCube const & textureCubeArray::operator[] 38 | ( 39 | layer_type const & Layer 40 | ) const 41 | { 42 | return this->Arrays[Layer]; 43 | } 44 | 45 | inline bool textureCubeArray::empty() const 46 | { 47 | return this->Arrays.empty(); 48 | } 49 | 50 | inline textureCubeArray::format_type textureCubeArray::format() const 51 | { 52 | return this->Arrays.empty() ? FORMAT_NULL : this->Arrays[0].format(); 53 | } 54 | 55 | inline textureCubeArray::level_type textureCubeArray::levels() const 56 | { 57 | if(this->empty()) 58 | return 0; 59 | return this->Arrays[0].levels(); 60 | } 61 | 62 | inline void textureCubeArray::resize 63 | ( 64 | layer_type const & Layers, 65 | level_type const & Levels 66 | ) 67 | { 68 | for(textureCubeArray::size_type i = 0; i < this->Arrays.size(); ++i) 69 | this->Arrays[i].resize(Levels); 70 | } 71 | 72 | }//namespace gli 73 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gli.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-09-29 6 | // Licence : This source is under MIT License 7 | // File : gli/gli.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | /*! \mainpage OpenGL Image 11 | * 12 | */ 13 | 14 | #ifndef GLI_GLI_INCLUDED 15 | #define GLI_GLI_INCLUDED 16 | 17 | #define GLI_VERSION 31 18 | #define GLI_VERSION_MAJOR 0 19 | #define GLI_VERSION_MINOR 3 20 | #define GLI_VERSION_PATCH 1 21 | #define GLI_VERSION_REVISION 0 22 | 23 | #include "./core/texture2d.hpp" 24 | #include "./core/texture2d_array.hpp" 25 | #include "./core/texture_cube.hpp" 26 | #include "./core/texture_cube_array.hpp" 27 | #include "./core/size.hpp" 28 | #include "./core/operation.hpp" 29 | #include "./core/generate_mipmaps.hpp" 30 | 31 | #endif//GLI_GLI_INCLUDED 32 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/compression.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/compression.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_COMPRESSION_INCLUDED 11 | #define GLI_GTX_COMPRESSION_INCLUDED 12 | 13 | namespace gli{ 14 | namespace gtx{ 15 | namespace compression 16 | { 17 | 18 | 19 | }//namespace compression 20 | }//namespace gtx 21 | }//namespace gli 22 | 23 | namespace gli{using namespace gtx::compression;} 24 | 25 | #include "compression.inl" 26 | 27 | #endif//GLI_GTX_COMPRESSION_INCLUDED 28 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/compression.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/compression.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/fetch.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/fetch.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_FETCH_INCLUDED 11 | #define GLI_GTX_FETCH_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | 15 | namespace gli{ 16 | namespace gtx{ 17 | namespace fetch 18 | { 19 | template 20 | genType texelFetch( 21 | texture2D const & Texture, 22 | texture2D::dimensions_type const & Texcoord, 23 | texture2D::level_type const & Level); 24 | 25 | template 26 | genType textureLod( 27 | texture2D const & Texture, 28 | texture2D::texcoord_type const & Texcoord, 29 | texture2D::level_type const & Level); 30 | 31 | template 32 | void texelWrite( 33 | texture2D & Texture, 34 | texture2D::dimensions_type const & Texcoord, 35 | texture2D::level_type const & Level, 36 | genType const & Color); 37 | 38 | }//namespace fetch 39 | }//namespace gtx 40 | }//namespace gli 41 | 42 | namespace gli{using namespace gtx::fetch;} 43 | 44 | #include "fetch.inl" 45 | 46 | #endif//GLI_GTX_FETCH_INCLUDED 47 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/gl_texture2d.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-27 5 | // Updated : 2010-10-01 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/gl_texture2d.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_GL_TEXTURE2D_INCLUDED 11 | #define GLI_GTX_GL_TEXTURE2D_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include "../gtx/loader.hpp" 15 | 16 | #ifndef GL_VERSION_1_1 17 | #error "ERROR: OpenGL must be included before GLI_GTX_gl_texture2d" 18 | #endif//GL_VERSION_1_1 19 | 20 | namespace gli{ 21 | namespace gtx{ 22 | namespace gl_texture2d 23 | { 24 | GLuint createTexture2D(std::string const & Filename); 25 | }//namespace gl_texture2d 26 | }//namespace gtx 27 | }//namespace gli 28 | 29 | namespace gli{using namespace gtx::gl_texture2d;} 30 | 31 | #include "gl_texture2d.inl" 32 | 33 | #endif//GLI_GTX_GL_TEXTURE2D_INCLUDED 34 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/gradient.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/gradient.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_GRADIENT_INCLUDED 11 | #define GLI_GTX_GRADIENT_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | 15 | namespace gli{ 16 | namespace gtx{ 17 | namespace gradient 18 | { 19 | texture2D radial( 20 | texture2D::dimensions_type const & Size, 21 | texture2D::texcoord_type const & Center, 22 | float const & Radius, 23 | texture2D::texcoord_type const & Focal); 24 | 25 | texture2D linear( 26 | texture2D::dimensions_type const & Size, 27 | texture2D::texcoord_type const & Point0, 28 | texture2D::texcoord_type const & Point1); 29 | 30 | }//namespace gradient 31 | }//namespace gtx 32 | }//namespace gli 33 | 34 | namespace gli{using namespace gtx::gradient;} 35 | 36 | #include "gradient.inl" 37 | 38 | #endif//GLI_GTX_GRADIENT_INCLUDED 39 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/loader.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_INCLUDED 11 | #define GLI_GTX_LOADER_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include "../gtx/loader_dds9.hpp" 15 | #include "../gtx/loader_dds10.hpp" 16 | #include "../gtx/loader_tga.hpp" 17 | 18 | namespace gli{ 19 | namespace gtx{ 20 | namespace loader 21 | { 22 | inline texture2D load( 23 | std::string const & Filename); 24 | 25 | inline void save( 26 | texture2D const & Image, 27 | std::string const & Filename); 28 | 29 | }//namespace loader 30 | }//namespace gtx 31 | }//namespace gli 32 | 33 | namespace gli{using namespace gtx::loader;} 34 | 35 | #include "loader.inl" 36 | 37 | #endif//GLI_GTX_LOADER_INCLUDED 38 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/loader.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace gli{ 11 | namespace gtx{ 12 | namespace loader 13 | { 14 | inline texture2D load 15 | ( 16 | std::string const & Filename 17 | ) 18 | { 19 | if(Filename.find(".dds") != std::string::npos) 20 | return loadDDS10(Filename); 21 | else if(Filename.find(".tga") != std::string::npos) 22 | return loadTGA(Filename); 23 | else 24 | { 25 | assert(0); // File format not supported 26 | return texture2D(); 27 | } 28 | } 29 | 30 | inline void save 31 | ( 32 | texture2D const & Image, 33 | std::string const & Filename 34 | ) 35 | { 36 | char const * File = Filename.c_str(); 37 | 38 | if(Filename.find(".dds") != std::string::npos) 39 | saveDDS10(Image, Filename); 40 | else if(Filename.find(".tga") != std::string::npos) 41 | saveTGA(Image, Filename); 42 | else 43 | assert(0); // File format not supported 44 | } 45 | 46 | }//namespace loader 47 | }//namespace gtx 48 | }//namespace gli 49 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/loader_dds10.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-26 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_dds10.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_DDS10_INCLUDED 11 | #define GLI_GTX_LOADER_DDS10_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | 16 | namespace gli{ 17 | namespace gtx{ 18 | namespace loader_dds10 19 | { 20 | texture2D loadDDS10( 21 | std::string const & Filename); 22 | 23 | void saveDDS10( 24 | texture2D const & Image, 25 | std::string const & Filename); 26 | 27 | }//namespace loader_dds10 28 | }//namespace gtx 29 | }//namespace gli 30 | 31 | namespace gli{using namespace gtx::loader_dds10;} 32 | 33 | #include "loader_dds10.inl" 34 | 35 | #endif//GLI_GTX_LOADER_DDS10_INCLUDED 36 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/loader_dds9.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_dds9.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_DDS9_INCLUDED 11 | #define GLI_GTX_LOADER_DDS9_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | 16 | namespace gli{ 17 | namespace gtx{ 18 | namespace loader_dds9 19 | { 20 | texture2D loadDDS9( 21 | std::string const & Filename); 22 | 23 | void saveDDS9( 24 | texture2D const & Texture, 25 | std::string const & Filename); 26 | 27 | void saveTextureCubeDDS9( 28 | textureCube const & Texture, 29 | std::string const & Filename); 30 | 31 | }//namespace loader_dds9 32 | }//namespace gtx 33 | }//namespace gli 34 | 35 | namespace gli{using namespace gtx::loader_dds9;} 36 | 37 | #include "loader_dds9.inl" 38 | 39 | #endif//GLI_GTX_LOADER_DDS9_INCLUDED 40 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/loader_tga.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_tga.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_TGA_INCLUDED 11 | #define GLI_GTX_LOADER_TGA_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | #include 16 | 17 | namespace gli{ 18 | namespace gtx{ 19 | namespace loader_tga 20 | { 21 | texture2D loadTGA( 22 | std::string const & Filename); 23 | 24 | void saveTGA( 25 | texture2D const & Image, 26 | std::string const & Filename); 27 | 28 | }//namespace loader_tga 29 | }//namespace gtx 30 | }//namespace gli 31 | 32 | namespace gli{using namespace gtx::loader_tga;} 33 | 34 | #include "loader_tga.inl" 35 | 36 | #endif//GLI_GTX_LOADER_TGA_INCLUDED 37 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/wavelet.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-09 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/wavelet.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_WAVELET_INCLUDED 11 | #define GLI_GTX_WAVELET_INCLUDED 12 | 13 | namespace gli{ 14 | namespace gtx{ 15 | namespace wavelet 16 | { 17 | 18 | 19 | }//namespace wavelet 20 | }//namespace gtx 21 | }//namespace gli 22 | 23 | namespace gli{using namespace gtx::wavelet;} 24 | 25 | #include "wavelet.inl" 26 | 27 | #endif//GLI_GTX_WAVELET_INCLUDED 28 | -------------------------------------------------------------------------------- /common/include/glm/test/external/gli/gtx/wavelet.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-09 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/wavelet.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | -------------------------------------------------------------------------------- /common/include/glm/test/glm.cppcheck: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /common/include/glm/test/gtc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(gtc_half_float) 2 | glmCreateTestGTC(gtc_matrix_access) 3 | glmCreateTestGTC(gtc_matrix_integer) 4 | glmCreateTestGTC(gtc_matrix_inverse) 5 | glmCreateTestGTC(gtc_matrix_transform) 6 | glmCreateTestGTC(gtc_noise) 7 | glmCreateTestGTC(gtc_quaternion) 8 | glmCreateTestGTC(gtc_random) 9 | glmCreateTestGTC(gtc_swizzle) 10 | glmCreateTestGTC(gtc_type_precision) 11 | glmCreateTestGTC(gtc_type_ptr) 12 | -------------------------------------------------------------------------------- /common/include/glm/test/gtc/gtc_matrix_integer.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2010-09-16 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/matrix_integer.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Failed = 0; 16 | 17 | return Failed; 18 | } 19 | -------------------------------------------------------------------------------- /common/include/glm/test/gtc/gtc_matrix_inverse.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2010-09-16 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/matrix_inverse.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Failed = 0; 16 | 17 | return Failed; 18 | } 19 | -------------------------------------------------------------------------------- /common/include/glm/test/gtc/gtc_matrix_transform.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2010-09-16 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/matrix_transform.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Failed = 0; 16 | 17 | glm::mat4 Pick = glm::pickMatrix(glm::vec2(1, 2), glm::vec2(3, 4), glm::ivec4(0, 0, 320, 240)); 18 | 19 | return Failed; 20 | } 21 | -------------------------------------------------------------------------------- /common/include/glm/test/gtc/gtc_quaternion.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2011-05-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/quaternion.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | int test_quat_precision() 15 | { 16 | int Error = 0; 17 | 18 | Error += sizeof(glm::lowp_quat) <= sizeof(glm::mediump_quat) ? 0 : 1; 19 | Error += sizeof(glm::mediump_quat) <= sizeof(glm::highp_quat) ? 0 : 1; 20 | 21 | return Error; 22 | } 23 | 24 | int test_quat_type() 25 | { 26 | glm::quat A; 27 | glm::dquat B; 28 | 29 | return 0; 30 | } 31 | 32 | int main() 33 | { 34 | int Error = 0; 35 | 36 | Error += test_quat_precision(); 37 | Error += test_quat_type(); 38 | 39 | return Error; 40 | } 41 | -------------------------------------------------------------------------------- /common/include/glm/test/gtx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(gtx_bit) 2 | glmCreateTestGTC(gtx_gradient_paint) 3 | glmCreateTestGTC(gtx_integer) 4 | glmCreateTestGTC(gtx_matrix_query) 5 | glmCreateTestGTC(gtx_noise) 6 | glmCreateTestGTC(gtx_quaternion) 7 | glmCreateTestGTC(gtx_random) 8 | glmCreateTestGTC(gtx_rotate_vector) 9 | glmCreateTestGTC(gtx_simd_vec4) 10 | glmCreateTestGTC(gtx_simd_mat4) 11 | glmCreateTestGTC(gtx_string_cast) 12 | glmCreateTestGTC(gtx_ulp) 13 | glmCreateTestGTC(gtx_vector_angle) 14 | glmCreateTestGTC(gtx_vector_query) 15 | -------------------------------------------------------------------------------- /common/include/glm/test/gtx/gtx_gradient_paint.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-10-13 5 | // Updated : 2011-10-13 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/gradient_paint.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int test_radialGradient() 14 | { 15 | int Error = 0; 16 | 17 | float Gradient = glm::radialGradient(glm::vec2(0), 1.0f, glm::vec2(1), glm::vec2(0.5)); 18 | Error += Gradient != 0.0f ? 0 : 1; 19 | 20 | return Error; 21 | } 22 | 23 | int test_linearGradient() 24 | { 25 | int Error = 0; 26 | 27 | float Gradient = glm::linearGradient(glm::vec2(0), glm::vec2(1), glm::vec2(0.5)); 28 | Error += Gradient != 0.0f ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_radialGradient(); 38 | Error += test_linearGradient(); 39 | 40 | return Error; 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /common/include/glm/test/gtx/gtx_integer.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-10-11 5 | // Updated : 2011-10-11 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/gtx_integer.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | int test_floor_log2() 16 | { 17 | int Error = 0; 18 | 19 | for(std::size_t i = 1; i < 1000000; ++i) 20 | { 21 | glm::uint A = glm::floor_log2(glm::uint(i)); 22 | glm::uint B = glm::uint(glm::floor(glm::log2(double(i)))); // Will fail with float, lack of accuracy 23 | 24 | Error += A == B ? 0 : 1; 25 | assert(!Error); 26 | } 27 | 28 | return Error; 29 | } 30 | 31 | int test_log2() 32 | { 33 | int Error = 0; 34 | 35 | for(std::size_t i = 1; i < 24; ++i) 36 | { 37 | glm::uint A = glm::log2(glm::uint(1 << i)); 38 | glm::uint B = glm::uint(glm::log2(double(1 << i))); 39 | 40 | //Error += glm::equalEpsilon(double(A), B, 1.0) ? 0 : 1; 41 | Error += glm::abs(double(A) - B) <= 24 ? 0 : 1; 42 | assert(!Error); 43 | 44 | printf("Log2(%d) Error: %d, %d\n", 1 << i, A, B); 45 | } 46 | 47 | printf("log2 error: %d\n", Error); 48 | 49 | return Error; 50 | } 51 | 52 | int test_nlz() 53 | { 54 | int Error = 0; 55 | 56 | for(std::size_t i = 1; i < 33; ++i) 57 | Error += glm::nlz(i) == 31u - glm::findMSB(i) ? 0 : 1; 58 | //printf("%d, %d\n", glm::nlz(i), 31u - glm::findMSB(i)); 59 | 60 | return Error; 61 | } 62 | 63 | int main() 64 | { 65 | int Error = 0; 66 | 67 | Error += test_nlz(); 68 | Error += test_floor_log2(); 69 | Error += test_log2(); 70 | 71 | return Error; 72 | } 73 | -------------------------------------------------------------------------------- /common/include/glm/test/gtx/gtx_matrix_query.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2011-11-22 5 | // Updated : 2011-11-22 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/matrix_query.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int test_isNull() 14 | { 15 | int Error(0); 16 | 17 | bool TestA = glm::isNull(glm::mat4(0), 0.00001f); 18 | Error += TestA ? 0 : 1; 19 | 20 | return Error; 21 | } 22 | 23 | int test_isIdentity() 24 | { 25 | int Error(0); 26 | 27 | { 28 | bool TestA = glm::isIdentity(glm::mat2(1), 0.00001f); 29 | Error += TestA ? 0 : 1; 30 | } 31 | { 32 | bool TestA = glm::isIdentity(glm::mat3(1), 0.00001f); 33 | Error += TestA ? 0 : 1; 34 | } 35 | { 36 | bool TestA = glm::isIdentity(glm::mat4(1), 0.00001f); 37 | Error += TestA ? 0 : 1; 38 | } 39 | 40 | return Error; 41 | } 42 | 43 | int test_isNormalized() 44 | { 45 | int Error(0); 46 | 47 | bool TestA = glm::isNormalized(glm::mat4(1), 0.00001f); 48 | Error += TestA ? 0 : 1; 49 | 50 | return Error; 51 | } 52 | 53 | int test_isOrthogonal() 54 | { 55 | int Error(0); 56 | 57 | bool TestA = glm::isOrthogonal(glm::mat4(1), 0.00001f); 58 | Error += TestA ? 0 : 1; 59 | 60 | return Error; 61 | } 62 | 63 | int main() 64 | { 65 | int Error(0); 66 | 67 | Error += test_isNull(); 68 | Error += test_isIdentity(); 69 | Error += test_isNormalized(); 70 | Error += test_isOrthogonal(); 71 | 72 | return Error; 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /common/include/glm/test/gtx/gtx_simd_vec4.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2010-09-16 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/simd-vec4.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #if(GLM_ARCH != GLM_ARCH_PURE) 15 | 16 | int main() 17 | { 18 | glm::simdVec4 A1(0.0f, 0.1f, 0.2f, 0.3f); 19 | glm::simdVec4 B1(0.4f, 0.5f, 0.6f, 0.7f); 20 | glm::simdVec4 C1 = A1 + B1; 21 | glm::simdVec4 D1 = A1.swizzle(); 22 | glm::simdVec4 E1(glm::vec4(1.0f)); 23 | glm::vec4 F1 = glm::vec4_cast(E1); 24 | //glm::vec4 G1(E1); 25 | 26 | //printf("A1(%2.3f, %2.3f, %2.3f, %2.3f)\n", A1.x, A1.y, A1.z, A1.w); 27 | //printf("B1(%2.3f, %2.3f, %2.3f, %2.3f)\n", B1.x, B1.y, B1.z, B1.w); 28 | //printf("C1(%2.3f, %2.3f, %2.3f, %2.3f)\n", C1.x, C1.y, C1.z, C1.w); 29 | //printf("D1(%2.3f, %2.3f, %2.3f, %2.3f)\n", D1.x, D1.y, D1.z, D1.w); 30 | 31 | return 0; 32 | } 33 | 34 | #else 35 | 36 | int main() 37 | { 38 | int Error = 0; 39 | 40 | return Error; 41 | } 42 | 43 | #endif//(GLM_ARCH != GLM_ARCH_PURE) 44 | -------------------------------------------------------------------------------- /common/include/glm/util/FindGLM.cmake: -------------------------------------------------------------------------------- 1 | if(NOT GLM_PACKAGE_DIR) 2 | message("ERROR: GLM_PACKAGE_DIR requires to be set") 3 | endif(NOT GLM_PACKAGE_DIR) 4 | 5 | set(GLM_INCLUDE_DIR ${GLM_PACKAGE_DIR}) 6 | set(GLM_LIBRARY_DIR ) 7 | 8 | include_directories(${GLM_INCLUDE_DIR}) 9 | 10 | if(GLM_PACKAGE_DIR AND GLM_INCLUDE_DIR) 11 | set(GLM_FOUND "YES") 12 | endif(GLM_PACKAGE_DIR AND GLM_INCLUDE_DIR) 13 | -------------------------------------------------------------------------------- /common/include/glm/util/autoexp.txt: -------------------------------------------------------------------------------- 1 | [Visualizer] 2 | 3 | glm::detail::tvec2<*>{ 4 | preview ( 5 | #(#($c.x,$c.y)) 6 | ) 7 | children ( 8 | #([x]: $c.x,[y]: $c.y) 9 | ) 10 | } 11 | 12 | glm::detail::tvec3<*>{ 13 | preview ( 14 | #($e.x,$e.y,$e.z) 15 | ) 16 | children ( 17 | #([x]: $e.x,[y]: $e.y,[z]: $e.z) 18 | ) 19 | } 20 | 21 | glm::detail::tvec4<*>{ 22 | preview ( 23 | #($c.x,$c.y,$c.z,$c.w) 24 | ) 25 | children ( 26 | #([x]: $e.x,[y]: $e.y,[z]: $e.z, #([w]: $e.w)) 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /rasterisation/cornell_box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/cornell_box.jpg -------------------------------------------------------------------------------- /rasterisation/exe/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/exe/SDL.dll -------------------------------------------------------------------------------- /rasterisation/exe/rasterization.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/exe/rasterization.exe -------------------------------------------------------------------------------- /rasterisation/exe/rasterization_interpolation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/exe/rasterization_interpolation.exe -------------------------------------------------------------------------------- /rasterisation/latex/img/bug1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/bug1.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/bug2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/bug2.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/colors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/colors.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/colors_bug.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/colors_bug.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/depth_buffer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/depth_buffer.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/edges1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/edges1.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/edges2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/edges2.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/final1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/final1.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/final2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/final2.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/final3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/final3.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/final4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/final4.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/icon.png -------------------------------------------------------------------------------- /rasterisation/latex/img/interpolated_light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/interpolated_light.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/interpolated_pos1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/interpolated_pos1.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/interpolated_pos2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/interpolated_pos2.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/interpolated_pos3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/interpolated_pos3.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/logo_kth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/logo_kth.jpg -------------------------------------------------------------------------------- /rasterisation/latex/img/points.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/latex/img/points.jpg -------------------------------------------------------------------------------- /rasterisation/latex/rapport.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,12pt,final,oneside,openright]{article} 2 | \usepackage{report} 3 | 4 | \newcommand{\reporttitle}{Computer graphics and interaction} 5 | \newcommand{\enseignants}{ 6 | Christopher Peters 7 | } 8 | 9 | \newcommand{\reportauthor}{ 10 | Rémi Domingues} 11 | % \newcommand{\hexanome}{H4211} 12 | \newcommand{\reportsubject}{} 13 | \newcommand{\stagetopic}{Rasterization} 14 | \newcommand{\dateperiod}{April $24^{th}$ - May $19^{th}$} 15 | \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} 16 | \setlength{\parskip}{1ex} % Espace entre les paragraphes 17 | 18 | \hypersetup{ 19 | pdftitle={\reporttitle},% 20 | pdfauthor={\reportauthor},% 21 | pdfsubject={\reportsubject},% 22 | pdfkeywords={} 23 | } 24 | 25 | \title{\reporttitle} 26 | \author{\reportauthor} 27 | 28 | \setlongtables 29 | \usepackage[font=small,skip=0pt]{caption} 30 | \usepackage{algorithm} 31 | \usepackage{gensymb} 32 | 33 | 34 | %\setcounter{tocdepth}{4} 35 | \begin{document} 36 | \renewcommand{\chaptername}{} %\renewcommand{\thechapter}{} 37 | \renewcommand{\contentsname}{Contents} 38 | 39 | \pagestyle{empty} 40 | \pagenumbering{arabic} 41 | \input{title} 42 | \pagebreak 43 | \sloppy % Justification moins stricte : des mots ne dépasseront pas des paragraphes 44 | 45 | %\frontmatter 46 | \thispagestyle{empty} 47 | %\tableofcontents 48 | \addtocontents{toc}{\protect\thispagestyle{empty}} 49 | \pagebreak 50 | 51 | %\mainmatter 52 | \pagestyle{headings} 53 | %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}} 54 | %\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}} 55 | 56 | \input{content} 57 | 58 | %\backmatter 59 | \end{document} 60 | -------------------------------------------------------------------------------- /rasterisation/latex/title.tex: -------------------------------------------------------------------------------- 1 | % Inspiré de http://en.wikibooks.org/wiki/LaTeX/Title_Creation 2 | \begin{center} 3 | \begin{minipage}[t]{0.48\textwidth} 4 | \begin{flushleft} 5 | \includegraphics [width=30mm]{img/logo_kth.jpg} \\[0.1cm] 6 | Kungliga Tekniska Högskolan\\ 7 | Valhallavägen 79\\ 8 | 100 44 Stockholm 9 | \end{flushleft} 10 | \end{minipage} 11 | \begin{minipage}[t]{0.48\textwidth} 12 | \begin{flushright} 13 | \end{flushright} 14 | \end{minipage} \\[1cm] 15 | 16 | \textsc{\Large \reportsubject}\\[0.3cm] 17 | \HRule \\[0.4cm] 18 | {\Huge \bfseries \reporttitle}\\[0.3cm] 19 | {\LARGE \bfseries «~\stagetopic~»}\\[0.3cm] 20 | {\Large \dateperiod}\\[0.4cm] 21 | \HRule \\[1.5cm] 22 | 23 | \includegraphics [width=0.65\linewidth]{img/icon.png} \\[1.5cm] 24 | \begin{minipage}[t]{0.5\textwidth} 25 | \begin{flushleft} \large 26 | \emph{Author}\\ 27 | \reportauthor 28 | \end{flushleft} 29 | \end{minipage} 30 | \begin{minipage}[t]{0.4\textwidth} 31 | \begin{flushright} \large 32 | \emph{Teachers} \\ 33 | \enseignants 34 | \end{flushright} 35 | \end{minipage} 36 | 37 | \vfill 38 | \footnotesize{Scholar year 2014-2015} 39 | \end{center} 40 | -------------------------------------------------------------------------------- /rasterisation/rasterisation/rasterisation.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30501.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rasterisation", "rasterisation\rasterisation.vcxproj", "{0F66B258-21CC-418F-A8B3-CFCC132CC1B7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Debug|Win32.Build.0 = Debug|Win32 16 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Release|Win32.ActiveCfg = Release|Win32 17 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /rasterisation/rasterisation/rasterisation/rasterisation.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Fichiers sources 20 | 21 | 22 | 23 | 24 | Fichiers d%27en-tête 25 | 26 | 27 | -------------------------------------------------------------------------------- /rasterisation/report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/report.pdf -------------------------------------------------------------------------------- /rasterisation/subject.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/rasterisation/subject.pdf -------------------------------------------------------------------------------- /raytracing/cornell_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/cornell_box.png -------------------------------------------------------------------------------- /raytracing/exe/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/exe/SDL.dll -------------------------------------------------------------------------------- /raytracing/exe/raytracing.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/exe/raytracing.exe -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/benchmarksAA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/benchmarksAA.png -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/grayscale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/grayscale.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/no_aa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/no_aa.png -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/sobel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/sobel.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/sto16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/sto16x.png -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/sto8x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/sto8x.png -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/stoAA16x_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/stoAA16x_full.png -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/stochastic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/stochastic.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/super8x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/super8x.png -------------------------------------------------------------------------------- /raytracing/latex/img/antialiasing/uniform.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/antialiasing/uniform.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/backward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/backward.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/benchmarksThreads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/benchmarksThreads.png -------------------------------------------------------------------------------- /raytracing/latex/img/final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/final.png -------------------------------------------------------------------------------- /raytracing/latex/img/forward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/forward.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/glass_awesome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/glass_awesome.png -------------------------------------------------------------------------------- /raytracing/latex/img/glass_refraction.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/glass_refraction.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/icon.png -------------------------------------------------------------------------------- /raytracing/latex/img/ind_light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/ind_light.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/init.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/init.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/left.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/light1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/light1.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/light2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/light2.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/light3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/light3.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/light_col1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/light_col1.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/light_col2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/light_col2.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/light_col3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/light_col3.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/logo_kth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/logo_kth.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/ray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/ray.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/right.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/shadows.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/16.png -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/16_jittered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/16_jittered.png -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/256.png -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/256_jittered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/256_jittered.png -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/64.png -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/64_jittered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/64_jittered.png -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/light1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/light1.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/shadows/light2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/shadows/light2.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/specular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/specular.jpg -------------------------------------------------------------------------------- /raytracing/latex/img/spheres.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/latex/img/spheres.jpg -------------------------------------------------------------------------------- /raytracing/latex/rapport.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,12pt,final,oneside,openright]{article} 2 | \usepackage{report} 3 | 4 | \newcommand{\reporttitle}{Computer graphics and interaction} 5 | \newcommand{\enseignants}{ 6 | Christopher Peters 7 | } 8 | 9 | \newcommand{\reportauthor}{ 10 | Rémi Domingues 920604-T239 } 11 | % \newcommand{\hexanome}{H4211} 12 | \newcommand{\reportsubject}{} 13 | \newcommand{\stagetopic}{Raytracing} 14 | \newcommand{\dateperiod}{April $6^{th}$ - May $19^{th}$} 15 | \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} 16 | \setlength{\parskip}{1ex} % Espace entre les paragraphes 17 | 18 | \hypersetup{ 19 | pdftitle={\reporttitle},% 20 | pdfauthor={\reportauthor},% 21 | pdfsubject={\reportsubject},% 22 | pdfkeywords={} 23 | } 24 | 25 | \title{\reporttitle} 26 | \author{\reportauthor} 27 | 28 | \setlongtables 29 | \usepackage[font=small,skip=0pt]{caption} 30 | \usepackage{algorithm} 31 | \usepackage{algpseudocode} 32 | 33 | 34 | %\setcounter{tocdepth}{4} 35 | \begin{document} 36 | \renewcommand{\chaptername}{} %\renewcommand{\thechapter}{} 37 | \renewcommand{\contentsname}{Contents} 38 | 39 | \pagestyle{empty} 40 | \pagenumbering{arabic} 41 | \input{title} 42 | \pagebreak 43 | \sloppy % Justification moins stricte : des mots ne dépasseront pas des paragraphes 44 | 45 | %\frontmatter 46 | \thispagestyle{empty} 47 | \tableofcontents 48 | \pagebreak 49 | 50 | %\mainmatter 51 | \pagestyle{headings} 52 | %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}} 53 | %\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}} 54 | 55 | \input{part1} 56 | \input{part2} 57 | \pagebreak 58 | 59 | \bibliographystyle{plain} 60 | \renewcommand{\bibname}{References} 61 | \bibliography{references} 62 | 63 | %\backmatter 64 | \end{document} 65 | -------------------------------------------------------------------------------- /raytracing/latex/references.bib: -------------------------------------------------------------------------------- 1 | @inproceedings{moller2005fast, 2 | title={Fast, minimum storage ray/triangle intersection}, 3 | author={M{\"o}ller, Tomas and Trumbore, Ben}, 4 | booktitle={ACM SIGGRAPH 2005 Courses}, 5 | pages={7}, 6 | year={2005}, 7 | organization={ACM} 8 | } 9 | @inproceedings{whitted1979improved, 10 | title={An improved illumination model for shaded display}, 11 | author={Whitted, Turner}, 12 | booktitle={ACM SIGGRAPH Computer Graphics}, 13 | volume={13}, 14 | number={2}, 15 | pages={14}, 16 | year={1979}, 17 | organization={ACM} 18 | } 19 | @article{heckbert1989derivation, 20 | title={Derivation of Refraction Formulas}, 21 | author={Heckbert, Paul S}, 22 | journal={Introduction to Ray Tracing}, 23 | pages={288--293}, 24 | year={1989} 25 | } 26 | @article{sobel19683x3, 27 | title={A 3x3 isotropic gradient operator for image processing}, 28 | author={Sobel, Irwin and Feldman, Gary}, 29 | year={1968} 30 | } -------------------------------------------------------------------------------- /raytracing/latex/title.tex: -------------------------------------------------------------------------------- 1 | % Inspiré de http://en.wikibooks.org/wiki/LaTeX/Title_Creation 2 | \begin{center} 3 | \begin{minipage}[t]{0.48\textwidth} 4 | \begin{flushleft} 5 | \includegraphics [width=30mm]{img/logo_kth.jpg} \\[0.1cm] 6 | Kungliga Tekniska Högskolan\\ 7 | Valhallavägen 79\\ 8 | 100 44 Stockholm 9 | \end{flushleft} 10 | \end{minipage} 11 | \begin{minipage}[t]{0.48\textwidth} 12 | \begin{flushright} 13 | \end{flushright} 14 | \end{minipage} \\[1cm] 15 | 16 | \textsc{\Large \reportsubject}\\[0.3cm] 17 | \HRule \\[0.4cm] 18 | {\Huge \bfseries \reporttitle}\\[0.3cm] 19 | {\LARGE \bfseries «~\stagetopic~»}\\[0.3cm] 20 | {\Large \dateperiod}\\[0.4cm] 21 | \HRule \\[1.5cm] 22 | 23 | \includegraphics [width=0.65\linewidth]{img/icon.png} \\[1.5cm] 24 | \begin{minipage}[t]{0.5\textwidth} 25 | \begin{flushleft} \large 26 | \emph{Author}\\ 27 | \reportauthor 28 | \end{flushleft} 29 | \end{minipage} 30 | \begin{minipage}[t]{0.4\textwidth} 31 | \begin{flushright} \large 32 | \emph{Teachers} \\ 33 | \enseignants 34 | \end{flushright} 35 | \end{minipage} 36 | 37 | \vfill 38 | \footnotesize{Scholar year 2014-2015} 39 | \end{center} 40 | -------------------------------------------------------------------------------- /raytracing/raytracing/Fast_raytracer/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/raytracing/Fast_raytracer/SDL.dll -------------------------------------------------------------------------------- /raytracing/raytracing/raytracing.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30501.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raytracing", "raytracing\raytracing.vcxproj", "{0F66B258-21CC-418F-A8B3-CFCC132CC1B7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug_breakpoint|Win32 = Debug_breakpoint|Win32 11 | Fast_raytracer|Win32 = Fast_raytracer|Win32 12 | Release|Win32 = Release|Win32 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Debug_breakpoint|Win32.ActiveCfg = Debug_breakpoint|Win32 16 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Debug_breakpoint|Win32.Build.0 = Debug_breakpoint|Win32 17 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Fast_raytracer|Win32.ActiveCfg = Debug|Win32 18 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Fast_raytracer|Win32.Build.0 = Debug|Win32 19 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Release|Win32.ActiveCfg = Release|Win32 20 | {0F66B258-21CC-418F-A8B3-CFCC132CC1B7}.Release|Win32.Build.0 = Release|Win32 21 | EndGlobalSection 22 | GlobalSection(SolutionProperties) = preSolution 23 | HideSolutionNode = FALSE 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /raytracing/raytracing/raytracing/Material.h: -------------------------------------------------------------------------------- 1 | #ifndef MATERIAL_H 2 | #define MATERIAL_H 3 | 4 | /* Material */ 5 | typedef enum Material { 6 | Diffuse, 7 | DiffuseSpecular, 8 | Specular, 9 | Glass 10 | }; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /raytracing/raytracing/raytracing/Object3D.h: -------------------------------------------------------------------------------- 1 | #ifndef OBJECT3D_H 2 | #define OBJECT3D_H 3 | 4 | #include 5 | #include "Material.h" 6 | 7 | using glm::vec3; 8 | 9 | // Describe a triangle or a sphere 10 | class Object3D { 11 | public: 12 | // Object color (relevant if material is diffuse, diffuse and specular 13 | // or if the maximal number of bounces has been reached 14 | vec3 color; 15 | // Object material 16 | Material material; 17 | 18 | /* Constructor */ 19 | Object3D(vec3 color, Material material) 20 | :color(color), material(material) { 21 | } 22 | 23 | /* Return the normal of the current object. The position (of an intersection ray / object) 24 | * is relevant only for calls applied to a sphere */ 25 | virtual glm::vec3 normal(const glm::vec3& position) = 0; 26 | 27 | /* Return true and initialize the intersection parameter if the ray defined by 28 | * the starting point and direction intersects the objects, false otherwise */ 29 | virtual bool intersects(vec3 start, vec3 dir, vec3& intersection) = 0; 30 | 31 | /* Scale to the volume [-1,1]^3 */ 32 | virtual void scale(float L) = 0; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /raytracing/raytracing/raytracing/RCa06020: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/raytracing/raytracing/RCa06020 -------------------------------------------------------------------------------- /raytracing/raytracing/raytracing/Sphere.h: -------------------------------------------------------------------------------- 1 | #ifndef SPHERE_H 2 | #define SPHERE_H 3 | 4 | #include 5 | #include "Object3D.h" 6 | 7 | using glm::vec3; 8 | 9 | // Describe a sphere 10 | class Sphere : public Object3D { 11 | public: 12 | glm::vec3 center; 13 | float radius; 14 | 15 | Sphere(glm::vec3 c, float r, glm::vec3 color, Material material) 16 | :center(c), radius(r), Object3D(color, material) { 17 | } 18 | 19 | /* Return the normal of the current object. The position (of an intersection ray / object) 20 | * is relevant only for calls applied to a sphere */ 21 | virtual glm::vec3 normal(const glm::vec3& position) { 22 | return glm::normalize((position - center) / radius); 23 | } 24 | 25 | /* Return true and initialize the intersection parameter if the ray defined by 26 | * the starting point and direction intersects the objects, false otherwise */ 27 | bool intersects(vec3 start, vec3 dir, vec3& intersection) { 28 | float dx = dir.x; 29 | float dy = dir.y; 30 | float dz = dir.z; 31 | 32 | float a = dx*dx + dy*dy + dz*dz; 33 | float b = 2 * dx*(start.x - center.x) + 2 * dy*(start.y - center.y) + 2 * dz*(start.z - center.z); 34 | float c = center.x*center.x + center.y*center.y + center.z*center.z + start.x*start.x + start.y*start.y + start.z*start.z 35 | - 2 * (center.x*start.x + center.y*start.y + center.z*start.z) - radius*radius; 36 | 37 | float disc = b*b - 4 * a*c; 38 | 39 | // No intersection 40 | if (disc < 0) { 41 | return false; 42 | } 43 | // Ray tangent or intersects in two points 44 | float t = (-b - sqrt(disc)) / (2 * a); 45 | if (t < 0) { 46 | return false; 47 | } 48 | intersection.x = start.x + t * dx; 49 | intersection.y = start.y + t * dy; 50 | intersection.z = start.z + t * dz; 51 | 52 | return true; 53 | } 54 | 55 | /* Scale to the volume [-1,1]^3 */ 56 | virtual void scale(float L) { 57 | center *= 2 / L; 58 | center -= vec3(1, 1, 1); 59 | center.x *= -1; 60 | center.y *= -1; 61 | 62 | radius *= 2 / L; 63 | } 64 | }; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /raytracing/raytracing/raytracing/raytracing.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/raytracing/raytracing/raytracing.rc -------------------------------------------------------------------------------- /raytracing/report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/report.pdf -------------------------------------------------------------------------------- /raytracing/resource/benchmarksAA.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | 3 | steps = [2, 4, 8, 16]; 4 | disabled = [430, 430, 430, 430]; 5 | uniform = [1200, 1200, 1200, 1200]; 6 | stochastic = [1100, 1100, 1250, 1450]; 7 | 8 | fig = plt.figure(1) 9 | ax = fig.add_subplot(111) 10 | plt.axis([min(steps), max(steps), 0, max(stochastic) * 1.05]) 11 | plt.plot(steps, disabled, label="Anti-aliasing disabled") 12 | plt.plot(steps, disabled, 'bo') 13 | plt.plot(steps, uniform, label="Uniform 8x") 14 | plt.plot(steps, uniform, 'go') 15 | plt.plot(steps, stochastic, label="Stochastic sampling") 16 | plt.plot(steps, stochastic, 'ro') 17 | handles, labels = ax.get_legend_handles_labels() 18 | lgd = ax.legend(handles, labels, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) 19 | 20 | #plt.title("Render time") 21 | plt.xlabel('Additional rays per pixel') 22 | plt.ylabel('Render time (ms)') 23 | plt.show() 24 | 25 | fig.savefig('benchmarksAA', bbox_extra_artists=(lgd,), bbox_inches='tight') -------------------------------------------------------------------------------- /raytracing/resource/benchmarksThreads.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | 3 | steps = range(1, 9); 4 | values1 = [6548, 4790, 3607, 3351, 3042, 2594, 2159, 2000] 5 | values2 = [17793, 15916, 14780, 14762, 14335, 14130, 13844, 13244] 6 | values3 = [17793, 13454, 9228, 8965, 6908, 6667, 5923, 5589] 7 | values4 = [6548, 3250, 2500, 2032, 1500, 1363, 1239, 1100] 8 | values5= [17793, 9300, 7500, 5600, 5300, 4900, 4675, 4500] 9 | 10 | fig = plt.figure(1) 11 | ax = fig.add_subplot(111) 12 | plt.axis([min(steps), max(steps), 0, max([max(values1), max(values2)])*1.05 ]) 13 | plt.plot(steps, values1, label="No AA") 14 | plt.plot(steps, values2, label="Sequential AA") 15 | plt.plot(steps, values3, label="Multithreaded AA") 16 | plt.plot(steps, values4, label="Optimized (no AA)") 17 | plt.plot(steps, values5, label="Optimized (AA)") 18 | handles, labels = ax.get_legend_handles_labels() 19 | lgd = ax.legend(handles, labels, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) 20 | 21 | # plt.title("Render time") 22 | plt.xlabel('Number of threads') 23 | plt.ylabel('Render time (ms)') 24 | plt.show() 25 | 26 | fig.savefig('benchmarksThreads', bbox_extra_artists=(lgd,), bbox_inches='tight') 27 | -------------------------------------------------------------------------------- /raytracing/subject.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remidomingues/Computer-Graphics/e8e56c121faa4d708be2d6e6b26563eac4bd3740/raytracing/subject.pdf --------------------------------------------------------------------------------