LWJGL
May 21, 2012, 01:24:34
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL 2.8.3 released!
Home
Help
Search
Login
Register
LWJGL
>
Archive
>
DevIL
>
Problem creating a blank image
Pages: [
1
]
« previous
next »
Print
Author
Topic: Problem creating a blank image (Read 4764 times)
mot
Regular nerd
Posts: 57
Problem creating a blank image
«
on:
September 20, 2007, 06:20:32 »
I had trouble creating a blank image using DevIL. It was hard to find a way to do it at all and finally I found out in the original DevIL documentation that this should be done using ilTexImage with the Data parameter set to NULL.
However the LWJGL version of ilTexImage doesn't allow Data to be null so I allocated a direct ByteBuffer, left it empty and passed it to ilTexImage. When trying to blit another (loaded) image into this new image I got a memory access violation.
Since then my need to create blank images has diminished (I do the blitting using OpenGL now). Still wondering though if there's a way to create blank images that I missed. As a simple and ugly workaround I load a small blank PNG file, scale it to the desired size and clear it...
Logged
Tom Andrle - Catnap Games -
http://www.catnapgames.com
Evil-Devil
Prolific Timewaster
Posts: 268
Re: Problem creating a blank image
«
Reply #1 on:
October 08, 2007, 04:09:07 »
Just create a ByteBuffer of the appropriate texture size and use it as your blank texture. That works fine for me.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...