-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Scallop Phase property; modulating it produces wavy scallops. Add Load Texture command to File menu, so it's more obvious how to load texture. Allow texture file to be loaded via drag and drop from Explorer. Add check for updates feature. Optimize texture mapping, by copying texture from outer to inner wall. Add option to continuously update view during spline dragging.
- Loading branch information
1 parent
d82fe51
commit 9c79f9d
Showing
28 changed files
with
1,001 additions
and
574 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyleft 2013 Chris Korda | ||
// This program is free software; you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the Free | ||
// Software Foundation; either version 2 of the License, or any later version. | ||
/* | ||
chris korda | ||
revision history: | ||
rev date comments | ||
00 30jan13 initial version | ||
wrap transient DLL instance to avoid leaks | ||
*/ | ||
|
||
#include "stdafx.h" | ||
#include "DLLWrap.h" | ||
#include "atlconv.h" // for ATL string conversion macros | ||
|
||
CDLLWrap::CDLLWrap() | ||
{ | ||
m_hInst = NULL; | ||
} | ||
|
||
CDLLWrap::~CDLLWrap() | ||
{ | ||
FreeLibrary(); | ||
} | ||
|
||
bool CDLLWrap::LoadLibrary(LPCTSTR lpLibFileName) | ||
{ | ||
FreeLibrary(); // allow reuse of instance | ||
m_hInst = ::LoadLibrary(lpLibFileName); | ||
return(IsLoaded()); | ||
} | ||
|
||
bool CDLLWrap::LoadLibraryEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) | ||
{ | ||
FreeLibrary(); // allow reuse of instance | ||
m_hInst = ::LoadLibraryEx(lpLibFileName, hFile, dwFlags); | ||
return(IsLoaded()); | ||
} | ||
|
||
bool CDLLWrap::FreeLibrary() | ||
{ | ||
if (!IsLoaded()) // if library not loaded | ||
return(FALSE); | ||
if (!::FreeLibrary(m_hInst)) // if free fails | ||
return(FALSE); | ||
m_hInst = NULL; // invalidate handle | ||
return(TRUE); | ||
} | ||
|
||
FARPROC CDLLWrap::GetProcAddress(LPCTSTR lpProcName) | ||
{ | ||
USES_CONVERSION; // for ATL string conversion macros | ||
return(::GetProcAddress(m_hInst, T2CA(lpProcName))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyleft 2013 Chris Korda | ||
// This program is free software; you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the Free | ||
// Software Foundation; either version 2 of the License, or any later version. | ||
/* | ||
chris korda | ||
revision history: | ||
rev date comments | ||
00 30jan13 initial version | ||
wrap transient DLL instance to avoid leaks | ||
*/ | ||
|
||
#ifndef CDLLWRAP_INCLUDED | ||
#define CDLLWRAP_INCLUDED | ||
|
||
class CDLLWrap : public WObject { | ||
public: | ||
// Construction | ||
CDLLWrap(); | ||
~CDLLWrap(); | ||
|
||
// Attributes | ||
bool IsLoaded() const; | ||
FARPROC GetProcAddress(LPCTSTR lpProcName); | ||
|
||
// Operations | ||
bool LoadLibrary(LPCTSTR lpLibFileName); | ||
bool LoadLibraryEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags); | ||
bool FreeLibrary(); | ||
|
||
protected: | ||
// Data members | ||
HINSTANCE m_hInst; // handle to DLL instance | ||
}; | ||
|
||
inline bool CDLLWrap::IsLoaded() const | ||
{ | ||
return(m_hInst != NULL); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.