Skip to content

GL_ARB_bindless_texture Object reference not set #168

@Rosux

Description

@Rosux

I want to use bindless textures but any attempt at calling a bindless_texture method results in this error and then just crashes the program:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at OpenGL.Gl.GetTextureHandleARB(UInt32 texture)

I cant find any reason as to why this happens since my extensions does include the GL_ARB_bindless_texture.

code i used:

uint textureId = Gl.GenTexture();`
Gl.BindTexture(TextureTarget.Texture2d, textureId);

Gl.TexImage2D(TextureTarget.Texture2d, 0, InternalFormat.Rgba, 2, 2, 0, PixelFormat.Rgba, PixelType.UnsignedByte, new byte[] {0, 0, 0, 255, 255, 0, 255, 255, 255, 0, 255, 255, 0, 0, 0, 255});

Gl.TexParameteri(TextureTarget.Texture2d, TextureParameterName.TextureMagFilter, Gl.NEAREST);
Gl.TexParameteri(TextureTarget.Texture2d, TextureParameterName.TextureMinFilter, Gl.NEAREST);

Gl.GetTextureHandleARB(textureId);

GLFW initialization settings:

Glfw.WindowHint(Hint.ClientApi, ClientApi.OpenGL);
Glfw.WindowHint(Hint.ContextVersionMajor, 4);
Glfw.WindowHint(Hint.ContextVersionMinor, 6);
Glfw.WindowHint(Hint.OpenglProfile, Profile.Compatibility);
Glfw.WindowHint(Hint.Doublebuffer, true);

my question is, is this method implemented? am i missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions