Click here to Skip to main content
15,891,657 members
Home / Discussions / Java
   

Java

 
GeneralRe: HashMap... am I doing it wrong? Pin
Peter_in_27802-May-12 13:06
professionalPeter_in_27802-May-12 13:06 
GeneralRe: HashMap... am I doing it wrong? Pin
Stephen Dycus2-May-12 13:07
professionalStephen Dycus2-May-12 13:07 
AnswerRe: HashMap... am I doing it wrong? Pin
Peter_in_27802-May-12 13:05
professionalPeter_in_27802-May-12 13:05 
GeneralRe: HashMap... am I doing it wrong? Pin
Stephen Dycus2-May-12 13:06
professionalStephen Dycus2-May-12 13:06 
Question-Xlint Pin
jigar - shah 22-May-12 7:06
jigar - shah 22-May-12 7:06 
AnswerRe: -Xlint Pin
Stephen Dycus2-May-12 7:45
professionalStephen Dycus2-May-12 7:45 
Questionproject for you Pin
silverbuyer1-May-12 18:39
silverbuyer1-May-12 18:39 
QuestionJava + OpenGL ES: Test for Transparency? Pin
Stephen Dycus1-May-12 15:38
professionalStephen Dycus1-May-12 15:38 
Java
ByteBuffer pixel = ByteBuffer.allocateDirect(1);
byte transparentByte = 0;

gl.glBindTexture(GL10.GL_TEXTURE_2D, _id);

pixel.position(0);
gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, x, y, 1, 1, GL10.GL_ALPHA, GL10.GL_UNSIGNED_BYTE, pixel);				pixel.position(0);

if(pixel.get() != transparentByte)
{
     //DO STUFF
}


This never hits... It'll cycle through every pixel in the texture and never hit on a non-transparent pixel. What am I doing wrong?

EDIT: It looks like whether or not I use GL_ALPHA or GL_RGBA, pixel.get() returns 0 for every pixel... it's not grabbing it from the texture or I'm not using ByteBuffer correctly... hmm...

modified 1-May-12 22:11pm.

GeneralRe: Java + OpenGL ES: Test for Transparency? Pin
Stephen Dycus2-May-12 6:45
professionalStephen Dycus2-May-12 6:45 
QuestionJTables Implementation Pin
pawlu8929-Apr-12 1:53
pawlu8929-Apr-12 1:53 
AnswerRe: JTables Implementation Pin
BobJanova30-Apr-12 0:17
BobJanova30-Apr-12 0:17 
GeneralRe: JTables Implementation Pin
pawlu8930-Apr-12 22:37
pawlu8930-Apr-12 22:37 
QuestionRouting information Pin
debasish deb28-Apr-12 16:53
professionaldebasish deb28-Apr-12 16:53 
AnswerRe: Routing information Pin
Richard MacCutchan28-Apr-12 21:31
mveRichard MacCutchan28-Apr-12 21:31 
AnswerRe: Routing information Pin
jschell29-Apr-12 6:44
jschell29-Apr-12 6:44 
QuestionJava Socket in Ad Hoc Pin
Susy Nainggolan26-Apr-12 18:13
Susy Nainggolan26-Apr-12 18:13 
AnswerRe: Java Socket in Ad Hoc Pin
TorstenH.26-Apr-12 21:01
TorstenH.26-Apr-12 21:01 
GeneralRe: Java Socket in Ad Hoc Pin
Susy Nainggolan26-Apr-12 21:23
Susy Nainggolan26-Apr-12 21:23 
GeneralRe: Java Socket in Ad Hoc Pin
TorstenH.26-Apr-12 21:53
TorstenH.26-Apr-12 21:53 
GeneralRe: Java Socket in Ad Hoc Pin
Susy Nainggolan26-Apr-12 22:29
Susy Nainggolan26-Apr-12 22:29 
GeneralRe: Java Socket in Ad Hoc Pin
Susy Nainggolan26-Apr-12 23:25
Susy Nainggolan26-Apr-12 23:25 
AnswerRe: Java Socket in Ad Hoc Pin
Richard MacCutchan26-Apr-12 22:26
mveRichard MacCutchan26-Apr-12 22:26 
GeneralRe: Java Socket in Ad Hoc Pin
Susy Nainggolan26-Apr-12 23:02
Susy Nainggolan26-Apr-12 23:02 
GeneralRe: Java Socket in Ad Hoc Pin
Richard MacCutchan26-Apr-12 23:08
mveRichard MacCutchan26-Apr-12 23:08 
GeneralRe: Java Socket in Ad Hoc Pin
Susy Nainggolan26-Apr-12 23:12
Susy Nainggolan26-Apr-12 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.