Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: gluBuild2Dmipmaps indefined  (Read 1647 times)

0 Members and 1 Guest are viewing this topic.

Lainelir

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
gluBuild2Dmipmaps indefined
« on: April 03, 2024, 05:07:53 pm »
#include <SFML/Window.hpp>
#include <SFML/OpenGL.hpp>
#include <SFML/Graphics.hpp>

#include <gl\glu.h>
#include <gl\gl.h>

#pragma comment( lib, "OpenGL32.lib" )
#pragma comment( lib, "glu32.lib" )

using namespace sf;

int main()
{
    // create the window
    sf::Window window(sf::VideoMode(800, 600), "OpenGL");

    Texture backgroundTexture;
    backgroundTexture.loadFromFile("images/background.png");
    Sprite backgroundSprite(backgroundTexture);

    GLuint texture = 0;
    {
        Image image;
        image.loadFromFile("images/side.png");
        glGenTextures(1, &texture);
        glBindTexture(GL_TEXTURE_2D, texture);
     
       gluBuild2Dmipmaps //error indefined
       
    }

    return 0;
}
 

I use visual studio and have error:  gluBuild2Dmipmaps indefined

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: gluBuild2Dmipmaps indefined
« Reply #1 on: April 06, 2024, 05:20:25 pm »
Any reason you're not using the graphics module but do your own OpenGL coding?

I wouldn't recommend GLU, instead you may want to use GLAD: http://glad.sh

As for the error, if it can't find some GLU function, it's somehow not defined or misspelled, check the GLU documentation.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kojack

  • Sr. Member
  • ****
  • Posts: 343
  • C++/C# game dev teacher.
    • View Profile
Re: gluBuild2Dmipmaps indefined
« Reply #2 on: April 06, 2024, 07:03:13 pm »
It should be gluBuild2DMipmaps, not gluBuild2Dmipmaps.
(capital M)