Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Microsoft angle. Opengl es not rendering

  1. #1
    Newbie Newbie
    Join Date
    Jul 2018
    Posts
    2

    Question Microsoft angle. Opengl es not rendering

    Hi all,

    I was wondering if someone could help mw with this issue or has experienced the same.
    I am developing a UWP app using Microsoft angle.
    I am trying to render to a texture.
    The shaders' set up for rendering but when I try to draw nothing is drawn. I am including the gl3.h files.
    I am rendering to textures and alpha blending is turned on but nothing is being drawn.
    Is there an issue with the shaders'?


    Thank you in advance.


    Chris Davis

  2. #2
    Administrator Regular Contributor Khronos_webmaster's Avatar
    Join Date
    Apr 2007
    Location
    Montreal
    Posts
    184
    Include code so we can see what the problem might be. Also, worth reading our Forum Guidelines that will help you get an answer quickly.

    https://www.opengl.org/discussion_bo...03#post1262303
    Webmaster Khronos.org and OpenGL.org

  3. #3
    Newbie Newbie
    Join Date
    Jul 2018
    Posts
    2
    Quote Originally Posted by Khronos_webmaster View Post
    Include code so we can see what the problem might be. Also, worth reading our Forum Guidelines that will help you get an answer quickly.

    https://www.opengl.org/discussion_bo...03#post1262303
    Thanks for getting back to me.

    Here is the code I using

    ===========================================

    I am loading my shaders thus:

    Code cpp:
    GLuint shader = glCreateShader(GL_FRAGMENT_SHADER);
    glShaderSource(shader, nbr_src, src, NULL);
    GLint isCompiled = 0;
    glGetShaderiv(shader, GL_COMPILE_STATUS, &isCompiled);
    ...TESTING
     
    GLint program = glCreateProgram();
    glAttachShader(program, shader);
    glLinkProgram(program);

    Then I am rendering thus:

    Code cpp:
    GLuint glprogram = program;
    glUseProgram(glProgram);
     
    GLuint vao;
     
    GLint location;
    location = glGetUniformLocation(glProgram, "colour");
    if(location >= 0)
    {
        glUniform3(location, 0.0f, 0.0f, 0.0f);
    }
     
    glEnable(GL_BLEND);
     
    glBindVertexArray(vao);
    glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
     
    glUseProgram(0);
    Last edited by Dark Photon; 07-26-2018 at 05:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •