Vulkan cannot be used in GrDirectContext

10 views
Skip to first unread message

Rosculescu Ciprian

unread,
Sep 7, 2021, 6:28:07 PMSep 7
to skia-discuss
Hello, 
I have started by making a CMake project that involves skia, so far so good.
I have made a vulkan environment, which works very well, so now all that was left to do is setup skia with the current environment. 
The problem is that when using GrDirectContext it does not see the function MakeVulkan as a part of the class.

Bellow is my functions
static void SetupSkiaVulkan() {
    #define SK_VULKAN
    GrVkBackendContext* vkContext = new GrVkBackendContext;
    //GrDirectContext* context = nullptr; - compiles fine when the below line is commented out
    GrDirectContext::MakeVulkan(vkContext);
}

The error is the following:
[build] ../main.cpp:72:22: error: no type named 'MakeVulkan' in 'GrDirectContext'
[build]     GrDirectContext::MakeVulkan(vkContext);
[build]     ~~~~~~~~~~~~~~~~~^

I do not see anything wrong with this code, can someone please help with what i am missing.

Thank you,
Ciprian


Peter Vullings

unread,
Sep 7, 2021, 6:34:54 PMSep 7
to skia-d...@googlegroups.com

This is just a guess, but have you defined SK_VULKAN before you have #included skia?

 

#define SK_VULKAN

#include ….

 

static void SetupSkiaVulkan() {

    GrVkBackendContext* vkContext = new GrVkBackendContext;

    GrDirectContext::MakeVulkan(vkContext);

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/6bf7befc-54ab-4cc3-9f40-31399f98abdan%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages