Compare commits

...

5 Commits

Author SHA1 Message Date
vurtun 6b9f937475 Preserve old nuklear version 2019-12-02 00:01:55 +01:00
dumblob adc52d710f
Merge pull request #918 from crazyBaboon/master
comment icon_load() as it is not being used currently
2019-10-01 15:10:14 +02:00
crazyBaboon 1de7702b84
update comment related to icon_load() 2019-10-01 10:30:30 +01:00
crazyBaboon f7e79476ee
comment out icon_load()
As suggested, altought icon_load() is not used to build this example/canvas.c,
it might still be useful. So instead of deleting, the function is now commented.
2019-10-01 10:29:34 +01:00
crazyBaboon c52193b3f2
icon_load() function not used
This function was not used in this file, so... removed.
2019-09-30 23:58:37 +01:00
2 changed files with 30 additions and 17 deletions

View File

@ -1,5 +1,15 @@
# Nuklear
## ALL DEVELOPMENT MOVED ELSEWHERE
Dear visitor,
this repository, issue tracker, etc. is abandoned in favor of https://github.com/Immediate-Mode-UI/Nuklear . Any activity in this issue tracker, any pull requests, etc. will be ignored.
Looking forward to hearing from you in https://github.com/Immediate-Mode-UI/Nuklear
*Nuklear community*
[![Build Status](https://travis-ci.org/vurtun/nuklear.svg)](https://travis-ci.org/vurtun/nuklear)
This is a minimal state immediate mode graphical user interface toolkit

View File

@ -77,25 +77,28 @@ die(const char *fmt, ...)
exit(EXIT_FAILURE);
}
static struct nk_image
icon_load(const char *filename)
{
int x,y,n;
GLuint tex;
unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
if (!data) die("[SDL]: failed to load image: %s", filename);
/* function icon_load () is not used to build this file but might still be useful :) */
/*
static struct nk_image
icon_load(const char *filename)
{
int x,y,n;
GLuint tex;
unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
if (!data) die("[SDL]: failed to load image: %s", filename);
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
stbi_image_free(data);
return nk_image_id((int)tex);
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
stbi_image_free(data);
return nk_image_id((int)tex);
}
*/
static void
device_init(struct device *dev)