-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I'm trying to use glGenTextures(n:Int, textures:Array), but it gives me the following error:
Error: ./src/com/pixd/Texture.cpp: In static member function ‘static com::pixd::Texture com::pixd::Texture_obj::load(String)’:
./src/com/pixd/Texture.cpp:83:25: error: ‘GLuint’ was not declared in this scope
glGenTextures((int)1, (GLuint*)&(Array_obj< int >::__new().Add(tex->m_gpuTex)[0]));
^
./src/com/pixd/Texture.cpp:83:32: error: expected primary-expression before ‘)’ token
glGenTextures((int)1, (GLuint*)&(Array_obj< int >::__new().Add(tex->m_gpuTex)[0]));
^
./src/com/pixd/Texture.cpp:83:83: error: ‘glGenTextures’ was not declared in this scope
glGenTextures((int)1, (GLuint*)&(Array_obj< int >::__new().Add(tex->m_gpuTex)[0]));
^
Error: Build failed
Code:
var tex = new Texture();
var rawdata = sys.io.File.getBytes(fileName);
var sdata = Image.load_from_memory(rawdata.getData(), rawdata.length, 4);
var sinfo = Image.info_from_memory(rawdata.getData(), rawdata.length);
glGenTextures(1, [tex.m_gpuTex]);
Also why an Array? The function can be re-written to simply return an Array or a single Int since Haxe doesn't do pointers like C++ does.
Metadata
Metadata
Assignees
Labels
No labels