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

My root problem is that when using calls Dispose on a StreamWriter , it
My problem is that I am using the .hover method to get the x
I'm facing a problem that seems to have no straighforward solution. I'm using java.util.Map
I have a JQuery (using JQuery 1.4.2) problem that exhibits only in IE8 in
I'm using Entity Framework in my project, and I have the problem that, once
I am using swfupload to upload files on a website, the problem that every
I want to make a windowless application. The problem is that I'm using a
Problem: Customer X has requested that pages using XML DataBinding and Databound tables in
I am using TIdHttpServer to process some commands the problem is that some commands
I'm using masonry plugin in my website My problem is that the first 20

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.