Skip to main content
sonictk1
Known Participant
February 9, 2020
Answered

Photoshop C++ Recipes (A.K.A "How to write C++ Photoshop plug-ins")

  • February 9, 2020
  • 1 reply
  • 6648 views

Hi all:

 

Just thought I'd plug my tutorial here, since it seems that there's very little updated documentation out there on the C++ SDK. I go over the basics of building a C++ plugin for Photoshop, along with some neat tricks here and there:

 

http://www.sonictk.com/post/tutorial-photoshop-cpp-recipes/

 

(was requested to crosspost this here):

 

This topic has been closed for replies.
Correct answer Maxim33695283r196

Thank you man, you made some things way easier than they would have been (if possible at all).

1 reply

olverart
Inspiring
May 15, 2020

Thank you very much Sonictk1! It is a pain trying to understand the SDK and you are making it easier. As you said in the article, it is a long road and I need to read it carefully. I really appreaciate you took your time to write this man, hope I can migrate my CEP to a real plugin to make them faster! Do you know if there's a way to use GLSL within a plugin? I  haven't read your article fully but I'm on it!

sonictk1
sonictk1Author
Known Participant
May 15, 2020

Hi olverart:

 

Thanks for the kind words. It depends on what you mean by "use GLSL". If you look at the last recipe, it is an example of using D3D11 to draw an ImGui UI in a separate window, so in that sense, yes, you can totally create your own window and draw context to use whatever drawing API you wish. If you're talking about drawing _into_ a CEP panel, or onto the Photoshop canvas itself, I'm afraid I haven't experimented there. I'm sure if you really needed a way to do it though, you can hack some ways in (EnumWindows to find the window you want, create a draw context there and draw into it...although that might be pretty tedious and prone to problems)

olverart
Inspiring
May 15, 2020

I'll take a deep look tom the D3D11, I'm not very familiarized to work that deep because I know it is not easy learning curver haha, but I'm on the path now. I'm trying now to work with WebGL inside CEP panel, but seems it is not rendering the WebGL context, I don't know if it is because of the Chromium version. I saw a guy who did it with Illustrator but I can't find more. Have you tried to render WebGL in an extension? I'm trying with a simple color rendered, it works perfectly on a browser but seems it is not rendering inside the CEP Panel.