Announcement

Collapse
No announcement yet.

OpenGL vertex_program_arb usage?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • OpenGL vertex_program_arb usage?

    basically I am trying to write a OpenGL3 compatible renderer, but since the radeon driver just supports OpenGL1.5 I have to use vp/fp instead of GLSL.

    I already managed to write a simple shader and to load it. Now I want to push some external data into it like the Model-View-Matrix, which is the following in OpenGL3:

    int loc = glGetUniformLocation(programObject, "name");
    glUniformMatrix4fv(loc, 1, GL_FALSE, identity);

    I also would like to know whether there is a function closer to glVertexAttribPointer than glVertexPointer?

    Generally I am looking for a tutorial which explains a vp/fp based render and also has some documentation for the assembly language.

    Or if you have any other tips how to develop a OpenGL3 render with the OSS stack, they are welcome. Speed does not matter yet.

  • #2
    hum... I hope you haven't asked that on this forum only.
    You know there are forums where you are more likely to get an answer other than this one don't you?

    Comment


    • #3
      Originally posted by jntesteves View Post
      hum... I hope you haven't asked that on this forum only.
      You know there are forums where you are more likely to get an answer other than this one don't you?
      e.g., the official OpenGL discussion boards.

      Comment


      • #4
        The ARB_vertex_program/ARB_fragment_program extensions don't have a concept of uniforms. You can access OpenGL state using state.whatever, or copy the matrices manually into the program.local or program.env state arrays.

        Comment


        • #5
          thanks for the hints.

          @nhaehnle
          sure, I could work me through the OpenGL extension registry to find a solution. But it is actually a specification and thus not well suited as a reference/ turorial.

          How long do you think, would it have taken me to come up with something like this using it?
          http://www.opengl.org/discussion_boa...861#Post264861

          As a sidenote: I noticed that there is a GLSL compiler in the MESA tree. Do you know something whether it is usable as an alternative to Cgc?

          Comment


          • #6
            Well, I guess I'm just a very spec-minded person, comes with the territory of driver writing. I can write ARB programs just fine, and I never read any tutorials on it.

            The GLSL compiler in Mesa and Cgc solve different problems. The GLSL compiler in Mesa is the piece of code that drivers can use to implement ARB_vertex_shader, ARB_fragment_shader and related extensions. In other words, it is exactly what the name implies: It compiles GLSL (to an intermediate format which is then translated into binary instructions by the hardware driver).

            Comment


            • #7
              Originally posted by nhaehnle View Post
              Well, I guess I'm just a very spec-minded person, comes with the territory of driver writing. I can write ARB programs just fine, and I never read any tutorials on it.
              I've been told that just tends to happen after you have read a sufficient amount of specs. You eventually become fluent in the "language".

              Comment


              • #8
                Originally posted by nhaehnle View Post
                The GLSL compiler in Mesa and Cgc solve different problems. The GLSL compiler in Mesa is the piece of code that drivers can use to implement ARB_vertex_shader, ARB_fragment_shader and related extensions. In other words, it is exactly what the name implies: It compiles GLSL (to an intermediate format which is then translated into binary instructions by the hardware driver).
                ah, now I remember - MESA uses a fp/vp like language as it intermediate representation. Thus I thought it would be just fp/vp at the first glance...

                Comment

                Working...
                X