Results 1 to 2 of 2

Thread: viewport dimensions in vertex shader

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jan 2005
    Stockholm, Sweden

    viewport dimensions in vertex shader

    Simple question: Is there a built-in variable in GLSL that allows access to the viewport dimensions?

    There is of course a simple work-around by using a uniform variable, but I wanted to check anyway.

    I have checked the GLSL QuickRef and there is no mention of viewport there. It just seems strange to me that it shouldn't be readily available.



  2. #2
    Member Newbie
    Join Date
    Apr 2006

    Re: viewport dimensions in vertex shader

    not really. there are functions to retrieve texture dimensions though.

Similar Threads

  1. Replies: 4
    Last Post: 08-03-2017, 01:01 PM
  2. Replies: 3
    Last Post: 05-03-2017, 08:37 AM
  3. getting texture dimensions from inside a shader
    By minidrive in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-25-2013, 12:06 PM
  4. Replies: 5
    Last Post: 06-23-2013, 01:13 AM
  5. Blended Triangles with one vertex out of the viewport
    By devdept in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-10-2007, 05:01 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