Move texture objects to openglraw
This commit is contained in:
+5
-3
@@ -5,13 +5,15 @@ import Foreign.Storable
|
||||
import Graphics.GL.Core45
|
||||
import Graphics.Rendering.OpenGL hiding (Point, imageHeight, scale, translate)
|
||||
|
||||
|
||||
mglCreateSingle :: (GLsizei -> Ptr GLuint -> IO ()) -> IO GLuint
|
||||
mglCreateSingle f = do
|
||||
mglCreate :: (GLsizei -> Ptr GLuint -> IO ()) -> IO GLuint
|
||||
mglCreate f = do
|
||||
alloca $ \nameptr -> do
|
||||
f 1 nameptr
|
||||
peek nameptr
|
||||
|
||||
mglDelete :: (GLsizei -> Ptr GLuint -> IO ()) -> GLuint -> IO ()
|
||||
mglDelete f i = with i $ \ptr -> f 1 ptr
|
||||
|
||||
unTexture :: TextureObject -> GLuint
|
||||
unTexture (TextureObject t) = t
|
||||
|
||||
|
||||
Reference in New Issue
Block a user