|
@@ -1432,6 +1432,10 @@ int laGetReadyWith(laInitArguments* ia){
|
|
|
|
|
|
if(MAIN.InitArgs.EnableLogStdOut){ MAIN.EnableLogStdOut=1; }
|
|
|
|
|
|
+ laSetProofingLut(DATA_LUT_PROOF_SRGB, 0);
|
|
|
+ laSetProofingLut(DATA_LUT_PROOF_CLAY, 1);
|
|
|
+ laSetProofingLut(DATA_LUT_PROOF_D65P3, 2);
|
|
|
+
|
|
|
logPrintNew("Initialization Completed\n");
|
|
|
MAIN.InitDone=1;
|
|
|
|
|
@@ -2230,6 +2234,40 @@ void la_RefreshThemeColor(laTheme* th){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void laSetProofingLut(void* data, int which){
|
|
|
+ TNS_CLAMP(which,0,2);
|
|
|
+ MAIN.ProofingLUT[which]=data;
|
|
|
+ MAIN.LutNeedsRefreshing=1;
|
|
|
+}
|
|
|
+void la_RefreshProofingLut(){
|
|
|
+ if(!MAIN.CurrentWindow) return;
|
|
|
+ int table = MAIN.CurrentWindow->OutputColorSpace;
|
|
|
+
|
|
|
+ if(MAIN.CurrentLut != table+1){ MAIN.LutNeedsRefreshing=1; }
|
|
|
+ if(!MAIN.LutNeedsRefreshing) return;
|
|
|
+
|
|
|
+ tnsEnableShaderv(T->immShader);
|
|
|
+ tnsShader* s = T->immShader;
|
|
|
+ if(!MAIN.ProofingLUT[table] || !MAIN.CurrentWindow->OutputProofing){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!MAIN.LutTexture) glGenTextures(1, &MAIN.LutTexture);
|
|
|
+ tnsActiveTexture(GL_TEXTURE3);
|
|
|
+ glBindTexture(GL_TEXTURE_3D, MAIN.LutTexture);
|
|
|
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
|
|
+ glTexImage3D(GL_TEXTURE_3D,0,GL_RGB,LA_LUT_PRECISION,LA_LUT_PRECISION,LA_LUT_PRECISION,0,GL_RGB, GL_UNSIGNED_BYTE,MAIN.ProofingLUT[table]);
|
|
|
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
|
|
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
|
|
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
|
|
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
|
|
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
|
+ //glBindTexture(GL_TEXTURE_3D,0);
|
|
|
+ tnsActiveTexture(GL_TEXTURE0);
|
|
|
+ MAIN.CurrentLut = table+1;
|
|
|
+ MAIN.LutNeedsRefreshing=0;
|
|
|
+}
|
|
|
+
|
|
|
//I FUCKING HATE THIS STUPID FUNCTION
|
|
|
int la_SetUpUiListMatrix(laUiListDraw *uild, laUiList *Target, int _L, int _R, int LimH, int PanelH, int GlobalX, int GlobalY){
|
|
|
laUiListDrawItem *uildi = memAcquireSimple(sizeof(laUiListDrawItem));
|
|
@@ -2490,11 +2528,11 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
if(MAIN.EnableColorManagement){
|
|
|
tnsUniformOutputColorSpace(T->immShader,w->OutputColorSpace);
|
|
|
tnsUniformShowColorOverflowStripes(T->immShader,w->OutputShowStripes);
|
|
|
- tnsUniformColorComposing(T->immShader,w->UseComposing,w->ComposingGamma,w->ComposingBlackpoint);
|
|
|
+ tnsUniformColorComposing(T->immShader,w->UseComposing,w->ComposingGamma,w->ComposingBlackpoint,w->OutputProofing);
|
|
|
}else{
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
tnsUniformShowColorOverflowStripes(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
|
|
|
if (p->Mode && (!p->AnimationMode || (p->AnimationMode && p->AnimationRatio > 0.99) || p->AnimationMode==LA_PANEL_ANIMATION_FLASH)){
|
|
@@ -2616,7 +2654,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
tnsUniformShowColorOverflowStripes(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
void la_PanelDrawToOffsceen(laPanel *p, laUiList *uil){
|
|
|
if (p->OffScr){ tnsEnsureOffscreenStatus(p->OffScr, p->W,p->H); }
|
|
@@ -2888,11 +2926,12 @@ void la_BlockDefDrawSelf(laBlock *b, int CH){
|
|
|
|
|
|
tnsUseImmShader(); tnsEnableShaderv(T->immShader);
|
|
|
if(MAIN.EnableColorManagement){
|
|
|
- tnsUniformOutputColorSpace(T->immShader,MAIN.CurrentWindow->OutputColorSpace);
|
|
|
- tnsUniformColorComposing(T->immShader,MAIN.CurrentWindow->UseComposing,MAIN.CurrentWindow->ComposingGamma,MAIN.CurrentWindow->ComposingBlackpoint);
|
|
|
+ laWindow* w=MAIN.CurrentWindow;
|
|
|
+ tnsUniformOutputColorSpace(T->immShader,w->OutputColorSpace);
|
|
|
+ tnsUniformColorComposing(T->immShader,w->UseComposing,w->ComposingGamma,w->ComposingBlackpoint,w->OutputProofing);
|
|
|
}else{
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
|
|
|
for (p = b->Panels.pFirst; p; p = p->Item.pNext){
|
|
@@ -2956,7 +2995,7 @@ void la_BlockDefDrawSelf(laBlock *b, int CH){
|
|
|
tnsFlush();
|
|
|
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
void la_BlockDefDrawSelfEmpty(laBlock *b, int CH){
|
|
|
laBoxedTheme *bt = _LA_THEME_PANEL;
|
|
@@ -2964,11 +3003,12 @@ void la_BlockDefDrawSelfEmpty(laBlock *b, int CH){
|
|
|
|
|
|
tnsUseImmShader(); tnsEnableShaderv(T->immShader);
|
|
|
if(MAIN.EnableColorManagement){
|
|
|
- tnsUniformOutputColorSpace(T->immShader,MAIN.CurrentWindow->OutputColorSpace);
|
|
|
- tnsUniformColorComposing(T->immShader,MAIN.CurrentWindow->UseComposing,MAIN.CurrentWindow->ComposingGamma,MAIN.CurrentWindow->ComposingBlackpoint);
|
|
|
+ laWindow* w=MAIN.CurrentWindow;
|
|
|
+ tnsUniformOutputColorSpace(T->immShader,w->OutputColorSpace);
|
|
|
+ tnsUniformColorComposing(T->immShader,w->UseComposing,w->ComposingGamma,w->ComposingBlackpoint,w->OutputProofing);
|
|
|
}else{
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
|
|
|
tnsUseNoTexture();
|
|
@@ -2985,7 +3025,7 @@ void la_BlockDefDrawSelfEmpty(laBlock *b, int CH){
|
|
|
tnsFlush();
|
|
|
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
void la_BlockDefDrawRecursive(laWindow *w, laBoxedTheme *bt, laBlock *b){
|
|
|
if (b->B1){
|
|
@@ -3070,6 +3110,7 @@ void la_WindowDefDraw(laWindow *w, laBoxedTheme *bt){
|
|
|
la_ClearUnusedFramebuffers(w);
|
|
|
|
|
|
tnsDrawToScreen();
|
|
|
+ la_RefreshProofingLut();
|
|
|
|
|
|
tnsViewportWithScissor(0, 0, w->CW, w->CH);
|
|
|
glClearColor(0.2, 0.2, 0.3, 1.0);
|
|
@@ -3093,10 +3134,10 @@ void la_WindowDefDraw(laWindow *w, laBoxedTheme *bt){
|
|
|
tnsUseShader(T->immShader);tnsEnableShaderv(T->immShader);
|
|
|
if(MAIN.EnableColorManagement){
|
|
|
tnsUniformOutputColorSpace(T->immShader,w->OutputColorSpace);
|
|
|
- tnsUniformColorComposing(T->immShader,w->UseComposing,w->ComposingGamma,w->ComposingBlackpoint);
|
|
|
+ tnsUniformColorComposing(T->immShader,w->UseComposing,w->ComposingGamma,w->ComposingBlackpoint,w->OutputProofing);
|
|
|
}else{
|
|
|
tnsUniformOutputColorSpace(T->immShader,0);
|
|
|
- tnsUniformColorComposing(T->immShader,0,0,0);
|
|
|
+ tnsUniformColorComposing(T->immShader,0,0,0,0);
|
|
|
}
|
|
|
if(p->Refresh&LA_TAG_RECALC){
|
|
|
laRecalcPanelImmediate(p);
|