Krisjanis Rijnieks
15a9940e57
Create separate methods for creating triangle and quad surfaces
9 years ago
Krisjanis Rijnieks
9b50b5d62c
Add `GridWarpSurface` to the example xcodeproj
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
53b7d31c97
Improve literacy of the block comment on the top
10 years ago
Krisjanis Rijnieks
f9def747d0
Remove invalid jpg addon thumbnail
10 years ago
Krisjanis Rijnieks
9848c5265b
Replace addon thumbnail
10 years ago
Krisjanis Rijnieks
23767bc409
Update `CameraSource` to support RPi camera
10 years ago
Krisjanis Rijnieks
91d0ea175a
Add `ofxRPiCameraVideoGrabber` to `addons.make`
10 years ago
Krisjanis Rijnieks
449838d04c
Add `CameraSource` example
Based on thoughts about making the addon as lighweight as possible. One of possible future steps - do the same with video and image sources, leaving more space for user interface related issues.
10 years ago
Krisjanis Rijnieks
1170adfda3
Remove `example-*` from git ignore
10 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
0c639d9c14
Add information about ofxOMXPlayer releases
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
8269babd6c
Add homography util files to xcodeproj
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
ecda9bdb03
Add perspective warping toggling info to readme
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
dd52d4026a
Add `TogglePerspectiveCmd` files to xcode project
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
99ca8c68a7
Simplify `main.cpp` of the example
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
Krisjanis Rijnieks
ad76db5319
Clean up `SurfaceManager`
10 years ago
Krisjanis Rijnieks
5cfa51718b
Remove `SurfaceStack` test from `SurfaceManager`
10 years ago
Krisjanis Rijnieks
b4f2e7bcb7
Fix `SurfaceManager::saveXmlSettings()`
10 years ago