Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sincerely seeking advice, How to replace the flutter default program & shaders on linux? #8

Open
huxiaoluder opened this issue Mar 8, 2024 · 0 comments

Comments

@huxiaoluder
Copy link

TextureGL *
texture_gl_new(VideoRenderer *renderer, guint32 width, guint32 height) {
    TextureGL *self = TEXTURE_GL(g_object_new(texture_gl_get_type(), NULL));
    self->renderer = renderer;
    self->width = width;
    self->height = height;

    auto vertexShader = loadShader(GL_VERTEX_SHADER, vertShaderSource);
    auto fragmentShader = loadShader(GL_FRAGMENT_SHADER, fragShaderSource);
    self->program = linkProgram(vertexShader, fragmentShader);

    glUseProgram(self->program);
    glDeleteShader(vertexShader);
    glDeleteShader(fragmentShader);

    self->attrBuffer = bindFullViewportAttrBuffer();

    self->textureId = generateEmptyTexture2D();
    self->framebufferId = generateFrameBufferTexture2D(self->textureId);

    return self;
}

This is my code, but not invalid...

@huxiaoluder huxiaoluder changed the title Sincerely seeking advice, How to replace the flutter default program & shaders? Sincerely seeking advice, How to replace the flutter default program & shaders on linux? Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant