my Notebook makes strange noise so i installed Kos on a New PC
Everything is working fine, just some parts of my code is not working any more.
the main problem is that the "PNG Textures code" doesnt work any more
short for if the code
Code: Select all
#include <png/png.h>
GLuint textures[20],startbildschirm,cube,logo,font,cursor;
void quard(int x1,int x2, int y1, int y2, int add){ // rechteck mit ganyer textur
glBegin(GL_QUADS);
glColor4f(1.0,1.0,1.0,1.0f);
glTexCoord2f(0,0);
glVertex3f(x1,y1,add); // durch add in der hoehe verschiebbar
glTexCoord2f(1,0);
glVertex3f(x2,y1,add);
glTexCoord2f(1,1);
glVertex3f(x2,y2,add);
glTexCoord2f(0,1);
glVertex3f(x1,y2,add);
glEnd();
}
void loadtxr_png(const char *fn, GLuint *txr) {
kos_img_t img;
pvr_ptr_t txaddr;
GLuint mask = PNG_MASK_ALPHA;
GLuint frmt = GL_ARGB1555_TWID;
if (png_to_img(fn,mask, &img) < 0) {
printf("can't load %s\n", fn);
return;
}
txaddr = pvr_mem_malloc(img.w * img.h * 2);
pvr_txr_load_kimg(&img, txaddr, PVR_TXRLOAD_16BPP);
kos_img_free(&img, 0);
glGenTextures(1, txr);
glBindTexture(GL_TEXTURE_2D, *txr);
glKosTex2D(frmt, img.w, img.h, txaddr); //<--------------------- the Problem
}
int main(int argc, char **argv) {
loadtxr_png("/rd/logo.png", &logo );
while(1){
glBindTexture(GL_TEXTURE_2D, logo); // fighter oben
quard(120,520, 480, 160, 4);
}
}
the compile dont like this line
glKosTex2D(frmt, img.w, img.h, txaddr);
compiler msg
test.o: In Funktion `loadtxr_png':
/opt/toolchains/dc/test/test.c:33: Nicht definierter Verweis auf `_glKosTex2D'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** [test.elf] Fehler 1
Nicht definierter Verweis auf = undefined reference to