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 7646089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:07:04+00:00 2026-05-31T10:07:04+00:00

My shader implicitly casts an int to float, which results in a C7011 warning.

  • 0

My shader implicitly casts an int to float, which results in a C7011 warning.

int i = 1;
float f = i;

I don’t care and never will care about this warning. However, when trying to debug my shader, I have to wade through a bunch of these warnings to find an error. Is there any way to suppress these warnings?

I tried looking up options for #pragma, but I couldn’t find anything.

Thanks in advance.

  • 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-05-31T10:07:06+00:00Added an answer on May 31, 2026 at 10:07 am

    Not sure if this helps you much, but maybe check out the quick reference for the version of glsl you are using. It looks like, according to page 7 of the 4.20 GLSL quick reference sheet, found at http://www.khronos.org/files/opengl42-quick-reference-card.pdf, that you could just go with float f = float(i), thought I am not on a computer I can current test that on.

    If that doesn’t work, you may want to check out intBitsToFloat funciton found on page 9 of the same reference sheet. Though it only exists on glsl version 3.3 and above, if you are using that version or greater, it might give you the conversion you want.

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

Sidebar

Related Questions

i am using this code to check if my glsl shader compiled fine. glGetObjectParameterivARB(obj,
I have a very basic fragment shader which I want to output 'gl_PrimitiveID' to
I'm trying to use the Vertex shader to relocate particles(stored in a texture) which
Im trying to create a fragment shader that will do the same job as
I have a shader that has the following uniform declared: uniform highp float fr;
This is my vertex shader code: attribute vec4 position; attribute vec4 inputTextureCoordinate; varying vec2
We've one pixel shader in HLSL which is used for slightly different things in
I'm tweaking the shader examples in OpenGL Superbible 2010 to learn about shader usage.
I have a vertex shader in which I do a texture lookup to determine
I have a shader that looks like this: void main( in float2 pos :

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.