コード例 #1
0
    public static SWIGTYPE_p_unsigned_char stbi_load_from_callbacks(stbi_io_callbacks clbk, SWIGTYPE_p_void user, SWIGTYPE_p_int x, SWIGTYPE_p_int y, SWIGTYPE_p_int comp, int req_comp)
    {
        IntPtr cPtr = OpenGLSupportPINVOKE.stbi_load_from_callbacks(stbi_io_callbacks.getCPtr(clbk), SWIGTYPE_p_void.getCPtr(user), SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y), SWIGTYPE_p_int.getCPtr(comp), req_comp);
        SWIGTYPE_p_unsigned_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);

        return(ret);
    }
コード例 #2
0
 // initialize a callback-based context
 private static void stbi__start_callbacks(stbi__context s, stbi_io_callbacks c, object user)
 {
     s.io                  = c;
     s.io_user_data        = user;
     s.buflen              = 128; // sizeof(s.buffer_start);
     s.read_from_callbacks = 1;
     s.buffer_start        = (byte *)Marshal.AllocHGlobal(128 * sizeof(byte));
     s.img_buffer_original = s.buffer_start;
     stbi__refill_buffer(s);
     s.img_buffer_original_end = s.img_buffer_end;
 }
コード例 #3
0
ファイル: stb_image.cs プロジェクト: zhqanddcy/CSharpGL
 private static void stbi__start_callbacks(stbi__context s, stbi_io_callbacks c, object user)
 {
     //            s->io = *c;
     //s->io_user_data = user;
     //s->buflen = sizeof(s->buffer_start);
     //s->read_from_callbacks = 1;
     //s->img_buffer_original = s->buffer_start;
     //stbi__refill_buffer(s);
     //s->img_buffer_original_end = s->img_buffer_end;
     s.io                  = c;
     s.io_user_data        = user;
     s.buflen              = s.buffer_start.array.Length;
     s.read_from_callbacks = true;
     s.img_buffer_original = s.buffer_start;
     stbi__refill_buffer(s);
     s.img_buffer_original_end = s.img_buffer_end;
 }
コード例 #4
0
    public static int stbi_info_from_callbacks(stbi_io_callbacks clbk, SWIGTYPE_p_void user, SWIGTYPE_p_int x, SWIGTYPE_p_int y, SWIGTYPE_p_int comp)
    {
        int ret = OpenGLSupportPINVOKE.stbi_info_from_callbacks(stbi_io_callbacks.getCPtr(clbk), SWIGTYPE_p_void.getCPtr(user), SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y), SWIGTYPE_p_int.getCPtr(comp));

        return(ret);
    }
コード例 #5
0
    public static int stbi_is_hdr_from_callbacks(stbi_io_callbacks clbk, SWIGTYPE_p_void user)
    {
        int ret = OpenGLSupportPINVOKE.stbi_is_hdr_from_callbacks(stbi_io_callbacks.getCPtr(clbk), SWIGTYPE_p_void.getCPtr(user));

        return(ret);
    }
コード例 #6
0
 public static SWIGTYPE_p_float stbi_loadf_from_callbacks(stbi_io_callbacks clbk, SWIGTYPE_p_void user, SWIGTYPE_p_int x, SWIGTYPE_p_int y, SWIGTYPE_p_int comp, int req_comp) {
   IntPtr cPtr = OpenGLSupportPINVOKE.stbi_loadf_from_callbacks(stbi_io_callbacks.getCPtr(clbk), SWIGTYPE_p_void.getCPtr(user), SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y), SWIGTYPE_p_int.getCPtr(comp), req_comp);
   SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
   return ret;
 }
コード例 #7
0
 public static int stbi_info_from_callbacks(stbi_io_callbacks clbk, SWIGTYPE_p_void user, SWIGTYPE_p_int x, SWIGTYPE_p_int y, SWIGTYPE_p_int comp) {
   int ret = OpenGLSupportPINVOKE.stbi_info_from_callbacks(stbi_io_callbacks.getCPtr(clbk), SWIGTYPE_p_void.getCPtr(user), SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y), SWIGTYPE_p_int.getCPtr(comp));
   return ret;
 }
コード例 #8
0
 public static int stbi_is_hdr_from_callbacks(stbi_io_callbacks clbk, SWIGTYPE_p_void user) {
   int ret = OpenGLSupportPINVOKE.stbi_is_hdr_from_callbacks(stbi_io_callbacks.getCPtr(clbk), SWIGTYPE_p_void.getCPtr(user));
   return ret;
 }
コード例 #9
0
 internal static HandleRef getCPtr(stbi_io_callbacks obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
コード例 #10
0
 internal static HandleRef getCPtr(stbi_io_callbacks obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }