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

  • Home
  • SEARCH
  • 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 3795558
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:06:07+00:00 2026-05-19T13:06:07+00:00

my problem is that, when using glutInitContextProfile(GLUT_CORE_PROFILE) instead of glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE) the textured areas just

  • 0

my problem is that, when using
glutInitContextProfile(GLUT_CORE_PROFILE) instead of glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE) the textured areas just stay black.
(just to emphasize that: with compatibility profile, everything works the way i expect it to)

I’m loading my textures with DevIL, usually with ilutGLLoadImage(filename), because i wasn’t sure if the tex parameters are set correctly by DevIL, i also load some textures with that code:

    ILuint img;
 ilGenImages(1, &img);
 ilBindImage(img);
 ILboolean ret = false;
 if((ret = ilLoadImage("...jpg"))){
  ret = ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);
  if(!ret){
   std::cout << "image conversion failed" << std::endl;
  }

  glGenTextures(1, &texture[20]);
  glBindTexture(GL_TEXTURE_2D, texture[20]);
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
  /*char imageData[27] = {
   127, 127, 127,
   127, 127, 127,
   127, 127, 127,
   127, 127, 127, 
   127, 127, 127,
   127, 127, 127,
   127, 127, 127,
   127, 127, 127,
   127, 127, 127,
  };*/
  //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 3, 3, 0, GL_RGB, GL_UNSIGNED_BYTE, imageData);

  glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),
       ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,
       ilGetData());
 }
 else{
  std::cout << "image file not found" << std::endl;
 }
 ilDeleteImages(1, &img);

I tested different tex-parameters without success, with those used, there should at least be no mipmapping related problems involved.
When i use the commented part with the imagedata-array, everything works fine, so i guess there is no problem with the binding, drawing and shading. If you think there could arise problems with that signature, i will post more code.

I know that, with core profile, textures can be considered "incomplete" for some reasons but i just can’t find why that should happen. I’m not getting any errors, neither from DevIL nor from OpenGL.

  • 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-19T13:06:08+00:00Added an answer on May 19, 2026 at 1:06 pm

    You should check for GL errors, ilGetInteger(IL_IMAGE_BPP) returns the number of bytes per pixel, which is NOT a internal format enum value. Use a enumeration such as GL_RGB or GL_RGBA instead. That was valid in the compatibility profile, but is not in the core profile.

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

Sidebar

Related Questions

Hello I have a pump class that requires using a member variable that is
I'm trying to find a file inside the system directory. The problem is that
While trying to compute the width of an hidden element I found that jquery.width()
I am currently dealing with several thousand boxes that i'd like to project onto
I'm working on an application that it's been giving me some trouble, partly because
UPDATE: I now have a solution I'm much happier with that, whilst not solving
I have a great problem and I don't know how to solve it I
I've used the code in this article before to create a custom validator to
This one has bugged me for a while now. Recently when revisiting some code
question relates to PHP and Javascript for now every table has a form with

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.