Results 1 to 3 of 3

Thread: Working with Programmable Pipeline on Previous Fixed Pipeline Code

  1. #1
    Junior Member Newbie sinaxp19's Avatar
    Join Date
    Mar 2015
    Posts
    18

    Working with Programmable Pipeline on Previous Fixed Pipeline Code

    Hi everyone,
    I'm working on an old data visualization code written on fixed pipeline (on OpenGL 1.1, using glBegin/glEnd blocks and Vertex2D, etc.). I need to update the graphical visualization methods to work with Shaders (and thus programmable pipeline). The problem is, as soon as I call glUseProgram() after creating the Shaders, everything becomes new! all background information are deleted (while on the same context) and an empty screen is presented with only Shader-drawn data. Is there anyway I can print my graph (drawn by vertex Shader) on the current screen (drawn by fixed pipeline and including axis, label and other info?)?

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,678
    After you bound your program, did you ever unbind it, by calling glUseProgram with 0?

  3. #3
    Junior Member Newbie sinaxp19's Avatar
    Join Date
    Mar 2015
    Posts
    18
    Quote Originally Posted by Alfonse Reinheart View Post
    After you bound your program, did you ever unbind it, by calling glUseProgram with 0?
    I cannot unbind it because later in my render function, I'll need to use that program. Do you mean that I should place my render code inside a glUseProgram(handle) / glUseProgram(0) block and previous screen data will not be modified? I haven't tried this, let me take a test run with your suggestion. thanks

    *** EDIT ***
    It works perfectly Alfonse! you just saved me from weeks of code mapping, thanks

Similar Threads

  1. Replies: 0
    Last Post: 08-18-2017, 08:44 AM
  2. Migration from Fixed pipeline to Programmable pipeline
    By Boumbles in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-27-2014, 04:43 PM
  3. Sprite Batching attempt programmable pipeline, VBOs nothing shown
    By Predator105 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-11-2013, 01:47 PM
  4. Moving vertices in Programmable Pipeline
    By Kreed in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 08-24-2012, 05:15 AM
  5. Texture Atlas Programmable Pipeline
    By UraniumSlug in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-23-2012, 09:16 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
  •  
Proudly hosted by Digital Ocean