Krisjanis Rijnieks
|
e5329d31b6
|
Add `AddGridRowCmd`
|
9 years ago |
Krisjanis Rijnieks
|
65074e50fb
|
Add `getProjectionEditor` method to `SurfaceManagerGui`
|
9 years ago |
Krisjanis Rijnieks
|
0ccdbe6839
|
Add `setGrid...` methods and fix `setTexCoords` for `GridWarpSurface`
|
9 years ago |
Krisjanis Rijnieks
|
feb2f7442b
|
Implement `moveTexCoords` for `GridWarpSurface` textures
|
9 years ago |
Krisjanis Rijnieks
|
88870ffe00
|
Add texture crop functionality to `GridWarpSurface`
|
9 years ago |
Krisjanis Rijnieks
|
e7a36c4a86
|
Add runtime error on set vert and tex coord index out of bounds
|
9 years ago |
Krisjanis Rijnieks
|
7bbeb572ea
|
Add texture editing joints depending on surface type
|
9 years ago |
Krisjanis Rijnieks
|
9704b6ea33
|
Add `getGridRows` and `getGridCols` methods
|
9 years ago |
Krisjanis Rijnieks
|
855b56cb8f
|
Implement `setTexCoord` and `setTexCoords` in `GridWarpSurface`
|
9 years ago |
Krisjanis Rijnieks
|
f125b68c8f
|
Fix saving source name blank string
|
9 years ago |
Krisjanis Rijnieks
|
32e5739a3e
|
Make it possible to save `GridWarpSurface`
|
9 years ago |
Krisjanis Rijnieks
|
51ce0c0524
|
Implement `GridWarpSurface::moveBy`
|
9 years ago |
Krisjanis Rijnieks
|
18d5970845
|
Remove debug wireframe from `GridWarpSurface::draw`
|
9 years ago |
Krisjanis Rijnieks
|
3e34e40a51
|
Add first non-crashing `hitTest` and `getHitArea` to `GridWarpSurface`
|
9 years ago |
Krisjanis Rijnieks
|
ab6a6032ac
|
Test create `GridMeshSurface` on `g` keypress
|
9 years ago |
Krisjanis Rijnieks
|
be0c0184d6
|
Add `createGridWarpSurface` method
|
9 years ago |
Krisjanis Rijnieks
|
15a9940e57
|
Create separate methods for creating triangle and quad surfaces
|
9 years ago |
Krisjanis Rijnieks
|
7e955b7128
|
Add `GridWarkSurface` initial source files
|
9 years ago |
Krisjanis Rijnieks
|
e27ec840d3
|
Add `GRID_WARP_SURFACE` type
|
9 years ago |
Krisjanis Rijnieks
|
7fd227e5a4
|
Fix `VideoSource` audio off when `enableAudio` flag is false
|
10 years ago |
Krisjanis Rijnieks
|
55a64fddfe
|
Comment out remove listeners methods in deconstr
On app exit it caused error and it is not worth to spend time on figuring out why.
|
10 years ago |
Krisjanis Rijnieks
|
bd44c0cc75
|
Make `ofxPiMapper` own _application`
Additionally implement `ofxPiMapper::loadXmlSettings` method
|
10 years ago |
Krisjanis Rijnieks
|
0d6106b22a
|
Move all essential application parts to `Application` class
|
10 years ago |
Krisjanis Rijnieks
|
173c5f7a2a
|
Integrare `HomographyHelper` into ofxPiMapper more deeply
|
10 years ago |
Krisjanis Rijnieks
|
7e86125d8b
|
Move `ofxHomographyHelper` out of its own directory
|
10 years ago |
Krisjanis Rijnieks
|
5a0e5c995d
|
Update homography helper: remove unused method
|
10 years ago |
Krisjanis Rijnieks
|
d1f483899b
|
Fix confusing `xml->push` in one method and `xml->pop` in another
|
10 years ago |
Krisjanis Rijnieks
|
f6f91bf498
|
Add nesting to `SettingsLoader::getQuadSurface`
|
10 years ago |
Krisjanis Rijnieks
|
4b47c2ef4c
|
Add nesting to `SettingsLoader::getTriangleSurface`
|
10 years ago |
Krisjanis Rijnieks
|
1b7768de92
|
Add nesting to `SettingsLoader::load`
|
10 years ago |
Krisjanis Rijnieks
|
4fc46da512
|
Clean up `QuadSurface`
|
10 years ago |
Krisjanis Rijnieks
|
3c3a41afb0
|
Get homography based perspective warping to work
|
10 years ago |
Krisjanis Rijnieks
|
03007310e6
|
Add homography utils
|
10 years ago |
Krisjanis Rijnieks
|
1c3d2392dc
|
Add perspective warping info to info layer, close #22
|
10 years ago |
Krisjanis Rijnieks
|
aece000bc2
|
Read per surface perspective warping setting from xml
|
10 years ago |
Krisjanis Rijnieks
|
127b766208
|
Add per surface perspective warping property saving to xml
|
10 years ago |
Krisjanis Rijnieks
|
6c4748e458
|
Integrate `TogglePerspectiveCmd` into `ProjectionMappingState`
By hitting `p` while in the projection mapping editor, selected surface toggles perspective on and off
|
10 years ago |
Krisjanis Rijnieks
|
f2fae8a239
|
Add `TogglePerspectiveCmd`
|
10 years ago |
Krisjanis Rijnieks
|
ba463f6db5
|
Add `getPerspectiveWarping()`
|
10 years ago |
Krisjanis Rijnieks
|
c7713779fc
|
Calculate 4d texture coordinates only if `_perspectiveWarping` flag is true
|
10 years ago |
Krisjanis Rijnieks
|
c3f687172e
|
Add `_perspectiveWarping` flag to `QuadSurface`
|
10 years ago |
Krisjanis Rijnieks
|
9001b7c73b
|
Remove empty texture warnings in surface drawing methods
|
10 years ago |
Krisjanis Rijnieks
|
dddfec4392
|
Add texture `isAllocated()` check before drawing surface
See issue #37
diff --git a/src/Surfaces/QuadSurface.cpp b/src/Surfaces/QuadSurface.cpp
index 3a9089b..e8af961 100644
--- a/src/Surfaces/QuadSurface.cpp
+++ b/src/Surfaces/QuadSurface.cpp
@@ -74,6 +74,10 @@ void QuadSurface::draw(){
ofLogWarning("QuadSurface") << "Source texture empty. Not drawing.";
return;
}
+
+ if(!source->getTexture()->isAllocated()){
+ return;
+ }
/*if(mesh.haveVertsChanged() || mesh.haveTexCoordsChanged()){
calculate4dTextureCoords();
diff --git a/src/Surfaces/TriangleSurface.cpp b/src/Surfaces/TriangleSurface.cpp
index 27e3951..88170ce 100644
--- a/src/Surfaces/TriangleSurface.cpp
+++ b/src/Surfaces/TriangleSurface.cpp
@@ -47,6 +47,10 @@ void TriangleSurface::draw(){
ofLogWarning("TriangleSurface") << "Source texture is empty. Not drawing.";
return;
}
+
+ if(!source->getTexture()->isAllocated()){
+ return;
+ }
source->getTexture()->bind();
mesh.draw();
|
10 years ago |
Krisjanis Rijnieks
|
6381eec5dd
|
Add `xml->pushTag()` and `xml->popTag()` todo
|
10 years ago |
Krisjanis Rijnieks
|
606d396635
|
Add blank lines before line comments
|
10 years ago |
Krisjanis Rijnieks
|
3a4dad4fde
|
Fix `SettingsLoader` warnings
|
10 years ago |
Krisjanis Rijnieks
|
920b3d2a0b
|
Improve `SettingsLoader`
Simplify the `load()` method by moving the quad and triangle surface creation to private methods
|
10 years ago |
Krisjanis Rijnieks
|
058eb23b13
|
Clean up `SurfaceManager`
|
10 years ago |
Krisjanis Rijnieks
|
6bb151b369
|
Move XML settings save and load to `SettingsLoader` singleton
|
10 years ago |
Krisjanis Rijnieks
|
079c4d5853
|
Add `Settings` class placeholder
|
10 years ago |