Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8430283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:33:54+00:00 2026-06-10T05:33:54+00:00

Will OpenGL automatically truncate it or is this an error? I have a piece

  • 0

Will OpenGL automatically truncate it or is this an error?

I have a piece of nasty OpenGL code that seems to be setting an array of float4x3 in the program by using glUniform4fv with a big array that has float4 values in it (i.e. 4 floats per row instead of 3), and it seems to work. That is OpenGL only copies 3 values to each row of the matrix and skips the 4th one. Is it OK to assume this will always work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:33:56+00:00Added an answer on June 10, 2026 at 5:33 am

    The GLSL specification is quite clear on this: the size and type for glUniform* calls must exactly match the size and type declared in the shader (except for samplers and booleans). So if you call glUniform4fv, you must be setting either a single variable of type vec4 or an array of count entries in an array variable of type vec4.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I compiled the following code: // Triangle.cpp // Our first OpenGL program that will
Let's say I'm creating an OpenGL game in C++ that will have many objects
As I had many problems setting Visual Studio 2008 for using OpenGL I will
I find that a lot of the time, OpenGL will show you it failed
I have some 3D models that I render in OpenGL in a 3D space,
I'm building an app for Mac OS 10.6 that will use OpenGL. I'd like
I want to port wxwidgets opengl application that will be not library dependent.I want
I will have to follow 1 course at my accademy. One is about openGL
I'm working on a new OpenGL application, and am aware that display lists will
I am trying to create a tool that will draw a shape in openGL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.