Compare commits
5 Commits
3e13d36678
...
6b9f937475
Author | SHA1 | Date |
---|---|---|
vurtun | 6b9f937475 | |
dumblob | adc52d710f | |
crazyBaboon | 1de7702b84 | |
crazyBaboon | f7e79476ee | |
crazyBaboon | c52193b3f2 |
10
Readme.md
10
Readme.md
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue