Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
glVertexAttribPointer error
#6
(03-16-2018, 07:44 PM)pahendriks Wrote:
(03-16-2018, 07:29 PM)Brian Beuken Wrote: Its not an error in the book Patrick,  there's actually a fault in the way you typed it in, i would really like you to  review your code and try to spot the error yourself, but if you get totally stuck (it can happen) I'll tell you in an hour.

but as this is not an actual error in the book, I will remove post when you find the problem

found it, missing &.

But no rectangle after compiling.

Can it be that this part has errors? Is the red code on the right place?

#include "MyFiles.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
MyFiles::MyFiles()
{}

MyFiles::~MyFiles()
{}

char* MyFiles::Load(char const *filename, int* width, int* height)
{
    unsigned char *data = stbi_load(filename, width, height, &comp, 4);
    
    MyFiles FileHandler;
    int Width, Height;
    char* OurRawData = FileHandler.Load((char*)"../Lenna.png", &Width, &Height);
    if (OurRawData == NULL) printf("We failed to load\n");
    
    return (char*) data;
}
Reply


Messages In This Thread
glVertexAttribPointer error - by pahendriks - 03-16-2018, 07:16 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 07:29 PM
RE: glVertexAttribPointer error - by pahendriks - 03-16-2018, 07:44 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 07:46 PM
RE: glVertexAttribPointer error - by pahendriks - 03-16-2018, 07:51 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 07:45 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 07:57 PM
RE: glVertexAttribPointer error - by pahendriks - 03-16-2018, 08:14 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 08:22 PM
RE: glVertexAttribPointer error - by pahendriks - 03-16-2018, 08:32 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 08:41 PM
RE: glVertexAttribPointer error - by pahendriks - 03-16-2018, 09:08 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 09:18 PM
RE: glVertexAttribPointer error - by pahendriks - 03-16-2018, 09:28 PM
RE: glVertexAttribPointer error - by Brian Beuken - 03-16-2018, 09:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)