diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-23 14:40:02 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-23 14:40:02 -0400 |
commit | 2e0e12140e95be18abf3cf7e54230ef22f410fbd (patch) | |
tree | 3cbbd9c31a87d96362c015aa6b649274dffb2235 /createcalls.cpp | |
parent | e25257a0431ef475e5106f7534319b161b81fcae (diff) |
effects can use gl state
Diffstat (limited to 'createcalls.cpp')
-rw-r--r-- | createcalls.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/createcalls.cpp b/createcalls.cpp index f8c166e..193deee 100644 --- a/createcalls.cpp +++ b/createcalls.cpp @@ -237,10 +237,12 @@ Layer_UpdateBitmap(project_data *File, project_layer *Layer, memory *Memory, int Bitmap_StencilAlpha(Bitmap->Data, DestBuffer, BytesPerPixel, UnpackedSize); } - for (int i = 0; i < Layer->NumberOfEffects; i++) - { - if (Layer->Effect[i]->IsActive) - Layer->Effect[i]->func(Source, BitmapInfo, Memory, Layer->Effect[i]->Property); + if (Layer->NumberOfEffects) { + for (int i = 0; i < Layer->NumberOfEffects; i++) + { + if (Layer->Effect[i]->IsActive) + Layer->Effect[i]->func(Source, BitmapInfo, Memory, Layer->Effect[i]->Property); + } } #endif } @@ -288,8 +290,8 @@ LoadTestFootage(project_data *File, project_state *State, memory *Memory) SourceString = String_GenerateFromChar(Memory, "../asset/p.mp4"); Source_Generate(File, Memory, SourceString); - // Layer_CreateFromSource(File, State, Memory, &File->Source[0]); - // SelectLayer(File->Layer[0], State, 0); + Layer_CreateFromSource(File, State, Memory, &File->Source[0]); + SelectLayer(File->Layer[0], State, 0); // property_channel *Property = &File->Layer[0]->x; // for (int i = 0; i < 16; i++) // Keyframe_Insert(Property, Memory, i*2, i*2*100); |